Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
Best practice for a lambda to fail / reject an event

I have an AWS Lambda that catches emails via an SNS trigger from SES.

I have a handful of validation conditions to determine if I should continue processing the event / email.

The code currently just exits from exports.handler if validation fails. However, I'd like to see validation issues in CloudWatch.

Should I throw an Error or return a particular object? I don't see much guidance in the docs for SES Notifications.

UPDATE When I say "see validation issues" in CloudWatch - I'd like to see validation issues graphed and possibly to create an alarm (lambda errors) w/ SNS topic and subscription (send email) over some threshold.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Your code can Publish custom metrics to Amazon CloudWatch. These metrics will appear just like any other metrics in CloudWatch Metrics.

You can then create Alarms based on these metrics.

This would be independent of Amazon SES Notifications.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!