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-1.0.0.tar.gz (89.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for lambda-error-sns-sender-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f67dcdbdd232eecdd387cbe5c48ac2e4ca60d8ab2e2639e49344e1818a89ffab
MD5 bc3785cc72208818f38df932fa262958
BLAKE2b-256 3cbbeebbd55ade619ca9f1db71c6e3d9a7aa72648ffa43a817674a782cfc2051

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lambda_error_sns_sender-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ced40e21f19fc602f3534f57a0a97cdfa504ae78417983dd504cbadee1fcadee
MD5 51ce4c5e9334023651ca0a83ed5a637d
BLAKE2b-256 3240bafe8b28b6e167d04e8abb5be36e9fefcfcb2254d973f9284f934daa2ae4

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