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

  • 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.53.tar.gz (89.5 kB view details)

Uploaded Source

Built Distribution

lambda_error_sns_sender-0.0.53-py3-none-any.whl (88.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for lambda-error-sns-sender-0.0.53.tar.gz
Algorithm Hash digest
SHA256 bc2fe09303e827600a9382559f46c77a95f1e83a9677c48c2f1959335877d881
MD5 30329da1fc63936d244ca2e4cf36cc97
BLAKE2b-256 bf94920746bc0187a4d6cde20732881d0370018e9b0ee63319642e2ccc1ccd9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lambda_error_sns_sender-0.0.53-py3-none-any.whl
Algorithm Hash digest
SHA256 956e99aec0df77fb2aa5d9661b5333268bc41e88129621f191576894fe62c1dd
MD5 f00f70f7a70ab113eb9d388ced03be5d
BLAKE2b-256 5ee83581b715b65f2d52b6280ec5eba1469a125433b7a48a5e0afc653a84a7dd

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