Skip to content

Conversation

@kakakakakku
Copy link
Contributor

Issue #, if available:
N/A

Description of changes:
Hi😀 Thanks for the useful patterns!

While testing lambda-durable-scheduled-tasks-sam, the API response returns blank taskId. Because Lambda functions with asynchronous invoke does not return response directly.
https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-integration-async.html

$ curl -X POST ${API_ENDPOINT}/tasks \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "reportType": "weekly",
      "dataSource": "analytics",
      "notifyEmail": "admin@example.com"
    }
  }'
{
  "taskId": "",
  "status": "INITIALIZED",
  "message": "Task started successfully"
}

But README is mentioned with taskId response.

Response:
```json
{
"taskId": "TASK-1733328000000",
"status": "INITIALIZED",
"message": "Task started successfully"
}
```

Check

I fixed mapping template and it works good.

$ curl -X POST ${API_ENDPOINT}/tasks \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "reportType": "weekly",
      "dataSource": "analytics",
      "notifyEmail": "admin@example.com"
    }
  }'
{
  "taskId": "TASK-1769224879385",
  "status": "INITIALIZED",
  "message": "Task started successfully"
}
image

Thank you😀


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants