Skip to main content

CDK construct to send Lambda detail errors to AWS SNS Topic.

Project description

Lambda Error SNS Sender

A simple solution to improve the CloudWatch alarm to receive Lambda error details by email. Available as CDK construct or as CloudFormation.

How does it work?

  1. Lambda is subscribed to the SNS topic where you receive your alarms. There is a message body subscription filter that limits errors based on the Lambda error metric. You must change the filter if you defied your metric in some other way, not the default one.
  2. Lambda analyzes the message, finds a log of the failed Lambda, and queries the log group for the period that the metric was configured, plus some additional safety time, so we do not miss that error message. It extracts just a number of errors that can fit in one SNS message.
  3. Lambda sends errors to the same SNS that you use for alerts. So, apart from the Alarm message for changing the error state, you will receive an additional one with detailed error messages.

lambda-error-sns-sender

The solution is in two forms:

  • CDK construct If you are building your system with CDK (or SST). Available for TypeScript, Java, C#, Python, and Go.
  • CloudFormation For existing solutions, so you do not have to modify them. You deploy and point to the existing SNS used for CloudWatch alarms.

If you are interested how to use it and how was build see the blog post.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lambda-error-sns-sender-0.0.54.tar.gz (89.3 kB view details)

Uploaded Source

Built Distribution

lambda_error_sns_sender-0.0.54-py3-none-any.whl (88.1 kB view details)

Uploaded Python 3

File details

Details for the file lambda-error-sns-sender-0.0.54.tar.gz.

File metadata

File hashes

Hashes for lambda-error-sns-sender-0.0.54.tar.gz
Algorithm Hash digest
SHA256 9627fe048a45d7e0c41f744148e3a709c4049d592f77ec765fda4c0f3a7568af
MD5 ef516276477d8961dd2f440ee4241751
BLAKE2b-256 12fe63fe6ef3a8fcecf7a444c1fe2ff052f0fd8ed1635ca3e1309a37009155f8

See more details on using hashes here.

File details

Details for the file lambda_error_sns_sender-0.0.54-py3-none-any.whl.

File metadata

File hashes

Hashes for lambda_error_sns_sender-0.0.54-py3-none-any.whl
Algorithm Hash digest
SHA256 a2e4c390e99a149fced494b5b10a2fe22ce580f262575d59d64406f7c59c67e5
MD5 1d9641ca0443d1886e2b577541420347
BLAKE2b-256 c8ad8bbb2b17818778d1694cb5d4502a52f63e8115b93f3d2548838d499c4122

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page