Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

API Gateway REST API protected with authorizer to SQS

Created with SnapAmazon API GatewayAmazon SQS

Create an API Gateway REST API that is protected with an AWS Lambda token authorizer and integrates with Amazon SQS

This CDK project demonstrates how to set up a queue based leveling pattern using AWS API Gateway REST API and Amazon SQS.
Processing higher number of HTTP and webhook events synchronously during traffic peaks can cause performance deteroration.
To avoid these situations, a common architectural strategy is to use a queue that acts as a buffer for these synchronous requests.
This CDK project deploys an API Gateway REST API that can act as a front door for requests and stores them in an Amazon SQS queue.
Furthermore, if you want to to protect your API Gateway with a custom authorizer the project also has a stack to takes a Lambda ARN which implements authorization logic.

< Back to all patterns


GitHub icon Visit the GitHub repo for this pattern.

Download

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

Deploy

CDK deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk delete.

Presented by Sai Kotagiri

Sai Kotagiri is a Partner Solutions Architect at Amazon Web Services based in New York metropolitan area. Sai has over 20 years of experience focusing on digital transformation and IT strategy

Follow on LinkedIn