AWS Builder Center
One weekend, one website: three traps I'd avoid with S3 and CloudFront

One weekend, one website: three traps I'd avoid with S3 and CloudFront

My answer to the one-weekend AWS project question: a static site on S3 behind CloudFront, kept private with OAC, with the certificate in the right Region and a cost guardrail before you build.

Cybersecurity & Cloud Computing student | Exploring AWS
Rufeda asked the Student Builders community what we'd build if we had one weekend for our first AWS project. My answer was a personal website on Amazon S3 behind CloudFront.
It's small enough to finish in two days, you end up with something you can show people, and it touches the pieces bigger projects need anyway: storage, a CDN, permissions, certificates and cost. It's also full of small traps. Here are the three I'd plan around before writing a single line of HTML.
Three traps for a weekend S3 and CloudFront site: public bucket, certificate in the wrong Region, no cost guardrail


Trap 1: making the bucket public

Many older tutorials switch on S3 static website hosting and then open the bucket to the world so browsers can read it. That works, but it means anyone can reach your files directly and skip CloudFront entirely.
With CloudFront in front, the bucket doesn't need to be public. Origin access control (OAC) lets CloudFront sign its requests to S3, and the bucket policy only allows CloudFront to read. AWS now recommends OAC over the older origin access identity (OAI).
The detail that catches people: OAC doesn't work with the S3 website endpoint. If you point CloudFront at the  s3-website  address, it's treated as a custom origin and you can't use OAC. Point it at the bucket's normal REST endpoint instead, and set a default root object such as  index.html .

Trap 2: the certificate in the wrong Region

You'll probably keep your bucket close to you. For me that would be Asia Pacific (Mumbai). Then you request an HTTPS certificate in AWS Certificate Manager in the same Region, try to attach it to CloudFront, and it doesn't appear.
CloudFront only uses ACM certificates from US East (N. Virginia), us-east-1. Request the certificate there, even if everything else lives somewhere else. If you're happy with the default  *.cloudfront.net  address for your first weekend, you can skip this step completely.

Trap 3: no guardrail on cost

My first lab taught me that "switched off" isn't the same as "free". A static site is far cheaper than an EC2 lab, but pay-as-you-go still has no ceiling if a link gets shared widely.
Since November 2025, CloudFront has flat-rate pricing plans with no overage charges, priced per distribution. The Free plan is $0 a month and, according to the pricing page, includes 1 million requests, 100 GB of data transfer and 5 GB of S3 storage, along with basic WAF and DDoS protection. Check the pricing page yourself before choosing, because the allowances and features differ between plans.
Whatever plan you pick, set a budget with email alerts before you build, not after the first bill.

My weekend plan

Saturday morning: create a budget and alerts, then write down every resource as I create it.
Saturday: private S3 bucket with Block Public Access left on, upload the site, create a CloudFront distribution with OAC and  index.html  as the default root object.
Sunday: test the site through the CloudFront URL, confirm the S3 URL is refused, and, if I want a custom domain, add an ACM certificate in us-east-1.
Sunday evening: decide whether the site stays up. If not, tear it down using the list from Saturday.
What would you build with one weekend? 👇


Sources
The image in this post is AI-generated. Pricing details were checked on November 25, 2026 and can change.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article