1 Answer
- Newest
- Most votes
- Most comments
0
You can secure your S3 bucket to only allow cloudfront while hosting your website and prevent anyone accessing it here using OAC https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html
This is the way to secure your bucket.
Your 2nd question you can route different uris to different sources https://advancedweb.hu/how-cloudfront-routing-works/#:~:text=Routing%20in%20CloudFront%20is%20based%20on%20the%20path%20of%20the%20request.&text=This%20is%20the%20distinguishing%20factor,backend%20server%20the%20request%20goes.
https://repost.aws/knowledge-center/cloudfront-distribution-serve-content
Relevant content
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated a year ago
@Gary Mclean, I have one question on this https://repost.aws/knowledge-center/cloudfront-distribution-serve-content, here it is mentioned that S3 is used for static content and ALB for dynamic content which is fine. My query is if it is possible to have one S3 bucket serving static content of two applications from the same bucket and if yes how can we better organize the structure of handling objects inside it.