Amazon CloudWatch Logs Subscription to AWS Lambda with Amazon SNS to Amazon SQS

CloudWatch Logs → AWS Lambda → SNS → SQS

Create a CloudWatch Logs subscription to a Lambda function, publish to SNS topic and deliver logs to SQS queue.

This pattern demonstrate how to use CloudWatch Logs to create Lambda subscription filter and publish the filtered logs to an SNS topic and deliver to an SQS queue. The logs sent to Lambda through a subsciption filter are base64 encoded and compressed with gzip format.

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

Deploy

cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

cdk destroy

Created by:

Kimia Yahyazadeh

AWS Cloud Application Developer

Sakthivel Chellapparimanam

AWS - Cloud Application Architect

Follow on LinkedIn