Skip to content

Enhance apigw-lambda-sns pattern with production-ready improvements #2793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

BigBoss531
Copy link

@BigBoss531 BigBoss531 commented Jul 16, 2025

Issue #, if available:

Continuation of this PR - attempted it incorrectly. All comments addressed in this PR

Description of changes:

  • Add comprehensive error handling with proper HTTP status codes
  • Implement environment variable validation for TOPIC_ARN
  • Return structured JSON responses with message IDs
  • Update API Gateway integration to aws_proxy type for proper response handling
  • Add 400/500 error response mappings in OpenAPI spec
  • Upgrade Python runtime from 3.8 to 3.13
  • Improve logging with detailed error information
  • Added a Canary to monitor the API GW
  • Added a CloudWatch Alarm to monitor 5XX errors on APIGW
  • Enabled X-Ray Active Tracing on Lambda & APIGW (These can be disabled by end user)

Ive tested and confirmed the above locally in my account via sam deploy

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants