aws-cdk-examples
aws-cdk-examples copied to clipboard
API Gateway Async Lambda Invocation
Describe the feature
This feature allows users to build an API Gateway with an asynchronous Lambda integration, in addition to a DynamoDB integration. The POST method submits an async request to Lambda, and returns a jobID to the user.
The user can then use the GET method to query the jobStatus for that jobId. The GET method relies on direct DynamoDB integration with API Gateway.
Use Case
Giving users the ability to receive a jobId for an async invocation, thus allowing them to check the jobStatus for that jobId.
Proposed Solution
I am using API Gateway context to return a requestId upon a POST request. The Lambda function stores this requestId in the DynamoDB table.
The GET method queries the DynamoDB table for that requestId, and returns the value of the status attribute.
Other Information
No response
Acknowledgements
- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
Language
Typescript
I have this working already. Happy to submit a pull request once the issue has been reviewed.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.