tf-python-cloudfront-apigw.patterns.advancelocal.dev
tf-python-cloudfront-apigw
A plain Python handler on Lambda from OpenTofu, no Zappa. CloudFront serves the page from S3 and caches /api/live from API Gateway for 5 seconds.
App
- Python 3.12 handler
Runs on
- CloudFront
- origin access control
- response headers policy
- S3
- API Gateway, regional
- Lambda, Python 3.12, deployed with OpenTofu
Foundation
- inf-baseline
- Wiz scanning
- Scheduled deploys and checks
Cache, live
Polling /api/live every second through CloudFront.
waiting for the first poll
CloudFront hittrip to the app