Lab 02: S3 Static Site with Route 53 & HTTPS
Register a domain in Route 53, secure the site with a free ACM SSL certificate, and serve it globally via CloudFront — accessible at both http:// and https://.
Services: S3 · Route 53 · CloudFront · ACM · IAM Cost: ~$0.50/mo Time: 3–5 hours Level: Intermediate
Overview
In this lab you will register a domain name in Amazon Route 53 and use it to serve a fully secure static website hosted on Amazon S3. By the end, your site will be accessible at both http://yourdomain.com and https://yourdomain.com — with automatic HTTP-to-HTTPS redirection powered by CloudFront.
Architecture Flow
- User types
https://yourdomain.cominto their browser - Route 53 resolves the domain name to the CloudFront distribution
- CloudFront serves the site over HTTPS using the ACM SSL certificate
- CloudFront fetches files from the S3 origin when not cached
- The website is returned to the user fully secured with HTTPS
AWS Services Used
| Service | Purpose | Cost |
|---|---|---|
| Amazon S3 | Stores and serves your static website HTML files | Free Tier |
| Amazon Route 53 | Manages your domain name and DNS records | $0.50/mo per hosted zone |
| AWS Certificate Manager | Provides a free SSL/TLS certificate for HTTPS | Always Free |
| Amazon CloudFront | CDN that delivers your site globally with HTTPS | Free Tier |
.link or .click for ~$3/year to minimize cost.Prerequisites
- Completed Lab 01 — you have a working S3 static website
- An active AWS account with billing set up and a credit/debit card on file
- Approximately $12–$15 for domain registration (one-time annual cost)
- 30–60 minutes available for DNS propagation between steps
Route 53 automatically creates a hosted zone for your domain when you register through it — no manual name server setup required.
- Search for
Route 53in the AWS Console and click it - In the left sidebar click Registered domains
- Click Register domain
- Search for your desired domain name and select a TLD (
.com,.net,.link, or.click) - Click Add to cart then Proceed to checkout
- Fill in the registrant contact information and check the agreement checkbox
- Click Submit
For Route 53 to route traffic correctly, your S3 bucket name must exactly match your domain name.
example.com, your bucket name must be example.com. A mismatch will cause routing errors.- Navigate to S3 and click Create bucket
- Bucket name: your exact domain name e.g.
cloudpracticelabs.org - Region:
us-east-1 - Uncheck Block all public access and check the acknowledgment
- Click Create bucket
- Open the bucket → Properties → Static website hosting → Edit
- Enable hosting, set index document to
index.htmland error document toerror.html - Click Save changes and copy the Bucket website endpoint URL
- Under Permissions add the public read bucket policy (same JSON as Lab 01, with your new bucket name)
- Upload your
index.htmlanderror.htmlfiles
ACM provides free SSL/TLS certificates. CloudFront will use this certificate to enable HTTPS.
us-east-1 (N. Virginia) to request this certificate. CloudFront only reads ACM certificates from us-east-1. Check your region selector in the top-right corner before proceeding.- Confirm your region is set to US East (N. Virginia) — us-east-1
- Search for Certificate Manager and click it
- Click Request a certificate → Request a public certificate → Next
- Fully qualified domain name:
yourdomain.com - Click Add another name and add:
www.yourdomain.com - Validation method: DNS validation
- Click Request
- Click the certificate ID → click Create records in Route 53 → Create records
- Wait 5–15 minutes and refresh — status should change to Issued
CloudFront sits in front of your S3 bucket, serves your site globally, and provides HTTPS using your ACM certificate.
- Search for CloudFront and click it → Create distribution
- Origin domain: select your S3 bucket website endpoint (ends in
.s3-website-us-east-1.amazonaws.com) - Origin protocol: HTTP only
- Viewer protocol policy: Redirect HTTP to HTTPS
- Alternate domain names (CNAME): add
yourdomain.comandwww.yourdomain.com - Custom SSL certificate: select the certificate from Step 3
- Default root object:
index.html - Click Create distribution
- Wait 5–15 minutes for status to change from Deploying to Enabled
- Copy the Distribution domain name (e.g.
d1234abcdef.cloudfront.net)
s3-website-us-east-1.amazonaws.com. The REST endpoint does not support index documents correctly.Root domain A record
- Go to Route 53 → Hosted zones and click your domain
- Click Create record
- Leave the Record name field blank (creates the root domain record)
- Record type: A Alias: ON
- Route traffic to: Alias to CloudFront distribution
- Select your CloudFront distribution and click Create records
www subdomain A record
- Click Create record again
- Record name:
wwwRecord type: A Alias: ON - Route traffic to: Alias to CloudFront distribution (same distribution)
- Click Create records
Test
- Wait 5–15 minutes for DNS propagation
- Visit
http://yourdomain.com— it should redirect tohttps://yourdomain.com - Click the padlock icon to confirm the SSL certificate is valid
- Also test
https://www.yourdomain.com
Verification Checklist
- http://yourdomain.com redirects automatically to https://yourdomain.com
- https://yourdomain.com loads your index.html page correctly
- https://www.yourdomain.com loads your index.html page correctly
- Browser padlock icon shows Certificate is valid with your domain name
- CloudFront distribution status shows Enabled in the AWS Console
- ACM certificate status shows Issued in Certificate Manager
- Route 53 hosted zone has A records for both root domain and www
What You Learned
- Amazon Route 53 — domain registration, hosted zones, DNS record types, and alias records
- AWS Certificate Manager — requesting free public SSL/TLS certificates and DNS validation
- Amazon CloudFront — creating CDN distributions, attaching SSL certificates, and HTTP-to-HTTPS redirection
- DNS propagation — how DNS changes spread globally and how to verify propagation status
- HTTPS and SSL/TLS — how certificates secure web traffic and the role of a CDN in terminating TLS
Lab Cleanup — Delete Your Resources
| # | Resource | How to Delete |
|---|---|---|
| 1 | CloudFront Distribution | CloudFront → Disable first, wait until Disabled, then Delete |
| 2 | ACM Certificate | Certificate Manager (us-east-1) → Certificates → Delete |
| 3 | Route 53 A Records | Route 53 → Hosted zone → select both A records → Delete records |
| 4 | S3 Bucket Contents | S3 → bucket → select all objects → Delete → type permanently delete |
| 5 | S3 Bucket | S3 → select bucket → Delete bucket → type bucket name → confirm |
| 6 | Route 53 Hosted Zone | Only if no longer needed — Route 53 → Hosted zones → Delete hosted zone |