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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for lambda-error-sns-sender-0.0.55.tar.gz
Algorithm Hash digest
SHA256 e309f219782786a7ad6c0c4d8a97c04329688dfe39416282da3e0eb6190a565e
MD5 46057ebb14369a1dc36e8a679551e1b0
BLAKE2b-256 78443a8f43cacf6d908e744e73c6176c6621406f8d2df41aecdd9c6a39f98143

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lambda_error_sns_sender-0.0.55-py3-none-any.whl
Algorithm Hash digest
SHA256 d39525be26213ffdc6249c9704680517538fab28f5756d6d4d28b5e64e861599
MD5 8c495af234eba1d53e614686247391b1
BLAKE2b-256 743d235d54cd65e9d793187df7f308ab747f362dd99d7509a7381d96478b1c9d

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