CloudFormation config to Serve Files from S3 and CloudFront without Public Bucket Permissions

Chris Bailey
4 min readFeb 17, 2024

CloudFormation recipe for use of a non-pubic S3 bucket with HTTPS and CloudFront (and custom domain) to serve web files.

Using Amazon S3 to serve web files or a static web site is a well known, cost effective tool. However, if you want the most security, and to use HTTPS, a custom domain, and set this all up via CloudFormation, it can be tricky.

Amazon has some samples for doing S3 web sites via CloudFormation, but these are actually out of date…

--

--

Chris Bailey

NatureQuant CTO/Co-founder. HotelTonight Co-founder. Cyclist, trail runner, skier, espresso & coffee lover, geek, traveler, foodie.