https://github.com/codemonauts/cloudfront-s3-multiregion
Lambda@Edge function to route S3 traffic to different regions
https://github.com/codemonauts/cloudfront-s3-multiregion
Last synced: 2 months ago
JSON representation
Lambda@Edge function to route S3 traffic to different regions
- Host: GitHub
- URL: https://github.com/codemonauts/cloudfront-s3-multiregion
- Owner: codemonauts
- Created: 2022-09-16T10:13:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-16T12:31:17.000Z (over 3 years ago)
- Last Synced: 2025-01-18T07:12:05.028Z (about 1 year ago)
- Language: Python
- Size: 1000 Bytes
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cloudfront S3 Multiregion
This Lambda@Edge function tries to find the best bucket to serve static content because Cloudfront can't directly talk
to an S3 multiregion access point.
## Assumptions / Setup
This script assumes that there is a bucket with the name `{BASE_NAME}` in the region `{FALLBACK_REGION}`. The buckets in all
other regions are named like `{BASE_NAME}-{region-name}`.
Then deploy this function to *us-east-1* and attach it to the *Origin Request* of your Cloudfront distribution.