Amazon API Gateway HTTP API to Amazon SQS

API Gateway → SQS

Create an Amazon API Gateway HTTP API that integrates with an Amazon SQS queue.

In this pattern, called "Queue based leveling", a serverless queue is introduced between your API Gateway and your workers, a Lambda function in this case.
The queue acts as a buffer to alleviate traffic spikes and ensure your workload can sustain the arriving load by buffering all the requests durably.
It also helps downstream consumers to process the incoming requests at a consistent pace.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/apigw-sqs-terraform

Deploy

terraform initterraform apply


Testing

See testing in the README.md file in the repo.

Cleanup

Delete the stack: terraform destroy.

Created by:

Ahmad Aboushady

Ahmad Aboushady

Senior Technical Account Manager, AWS