This pattern shows how to deploy a CDK application with API Gateway, SQS, Lambda, and DynamoDB.
This pattern deploys an Amazon API Gateway HTTP API with a route/submit configured with basic authentication.
On receiving a request, API Gateway will invoke a Lambda authorizer which validates the request and returns a policy informing API Gateway to accept or deny the request.
When the request is accepted, API Gateway sends the message payload to a queue in SQS. SQS uses another queue as a dead-letter queue to send the messages in case of continued failures to process the messages from the downstream Lambda function.
The messages from SQS are posted to a Lambda function to process them.
The Lambda function receives the messages from SQS and saves them into a DynamoDB table.