AWS X-Ray trace for Amazon SNS to Amazon SQS to AWS Lambda with AWS Powertools

AWS Lambda → Amazon SNS → Amazon SQS → AWS Lambda

How to use an AWS SAM template and Powertools for AWS Lambda to capture and propagate Amazon X-Ray trace.

The template deploys two Lambda functions, Producer and Consumer, SNS, SQS. The calling sequence is Lambda Producer -> SNS -> SQS -> Lambda Consumer.
The whole process flow is captured by X-Ray and displayed with Amazon CloudWatch X-Ray traces

< 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/sns-sqs-lambda-xray

Deploy

sam deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Thanit Youruchatangern

Thanit Youruchatangern

I am a Technical Account Manager at AWS based in Thailand. I help customer solving complex problems with simple solutions.

Follow on LinkedIn