Amazon API Gateway to Amazon SNS to Amazon SQS to AWS Lambda

API Gateway → Amazon SNS → Amazon SQS → AWS Lambda

Create an API Gateway REST API that integrates with SNS and SQS

This CDK application demonstrates how to set up a topic-queue-chaining pattern using Amazon SNS and Amazon SQS behind an Amazon API Gateway. This architecture helps in setting up a highly scalable API that can consume messages/events, fan them out and process them asynchronously.

< 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-sns-sqs-lambda-cdk-dotnet

Deploy

cdk deploy


Testing

See the repo for detailed testing notes.

Cleanup

1. Delete the stack: npx cdk destroy.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus".
3. You see a message confirming DELETE_COMPLETE.

Created by:

Mohammed Hafeez Ali Khan

Mohammed Hafeez Ali Khan

Cloud Application Architect at Amazon Web Services (AWS).

Follow on LinkedIn