AWS Cloud Practitioner — Lab 02 of 08

Lab 02 — Route 53 & HTTPS with CloudFront

Add a custom domain, free SSL certificate, and global CDN to your S3 website.

Intermediate~$0.50/mo + domain3–5 HoursRequires Lab 01

Lab Overview

PREREQ: Complete Lab 01 — S3 Static Website before this lab. You need an existing S3 static website.

Upgrade your Lab 01 website with a custom domain name, a free SSL certificate, and a global CDN. After this lab your site will be available at https://yourdomain.com with automatic HTTP-to-HTTPS redirection and low-latency delivery worldwide.

ServicePurposeFree Tier
Amazon Route 53Domain registration and DNS management~$12–15/year for .com domain
AWS CloudFrontGlobal CDN — serves your site from edge locations worldwide1TB data transfer + 10M requests/mo free
AWS ACMFree SSL/TLS certificate for HTTPSAlways free for use with CloudFront
Amazon S3Stores your website files — unchanged from Lab 01Free Tier

Step-by-Step Instructions

1
Amazon Route 53
Register a Domain Name
  1. Search for Route 53 in the AWS Console and click it
  2. In the left sidebar click Registered domains
  3. Click Register domains
  4. Search for your desired domain name e.g. yourdomain.com
  5. Select a domain and click Select
  6. Fill in your contact information
  7. Click Submit order
  8. Wait for the confirmation email — registration takes 10–30 minutes
NOTE: Use yourdomain.com as a placeholder throughout this lab. Replace it with your actual registered domain.
2
AWS ACM
Request an SSL Certificate
WARNING: You MUST switch to US East (N. Virginia) us-east-1 region before requesting this certificate. CloudFront only works with certificates in us-east-1.
  1. Search for Certificate Manager and click it
  2. Confirm the region shows N. Virginia in the top right
  3. Click Request a certificate
  4. Select Request a public certificate → Next
  5. Domain name: yourdomain.com
  6. Click Add another name and add www.yourdomain.com
  7. Validation method: DNS validation → Request
  8. Click Create records in Route 53 to auto-add the validation DNS records
  9. Wait 5–10 minutes for status to change from Pending to Issued
3
Amazon S3
Update Bucket for CloudFront
  1. Go to S3 → your bucket → Properties
  2. Note down the Static website hosting endpoint URL — you need it in Step 4
  3. No other changes needed to the bucket itself
4
Amazon CloudFront
Create a CloudFront Distribution
  1. Search for CloudFront and click it
  2. Click Create a CloudFront distribution
  3. Origin domain: paste your S3 website endpoint URL (not the S3 bucket URL)
  4. Protocol: HTTP only (S3 website endpoints don't support HTTPS as origin)
  5. Viewer protocol policy: Redirect HTTP to HTTPS
  6. Alternate domain names (CNAMEs): add yourdomain.com and www.yourdomain.com
  7. Custom SSL certificate: select the certificate you created in Step 2
  8. Default root object: index.html
  9. Click Create distribution
  10. Wait 10–15 minutes for the distribution to deploy — Status changes to Enabled
  11. Copy the Distribution domain name e.g. abc123.cloudfront.net
5
Amazon Route 53
Point Your Domain to CloudFront
  1. Go to Route 53 → Hosted zones → yourdomain.com
  2. Click Create record
  3. Record name: leave blank (for the root domain)
  4. Record type: A
  5. Enable Alias
  6. Route traffic to: Alias to CloudFront distribution
  7. Select your distribution from the dropdown
  8. Click Create records
  9. Repeat for www — Create another A record with name www pointing to the same CloudFront distribution
6
Web Browser
Test HTTPS Access
  1. Wait 5–10 minutes for DNS to propagate
  2. Visit https://yourdomain.com in your browser
  3. You should see the padlock icon confirming HTTPS
  4. Visit http://yourdomain.com — it should automatically redirect to HTTPS
  5. Visit https://www.yourdomain.com — should also work
TIP: If DNS hasn't propagated yet, test using the CloudFront domain: https://abc123.cloudfront.net

Verification Checklist

What You Learned

Lab Cleanup

IMPORTANT: Delete these resources to avoid ongoing charges.
#ResourceHow to Delete
1CloudFront DistributionCloudFront → select distribution → Disable → wait → Delete
2ACM CertificateACM → Certificates → select → Delete
3Route 53 RecordsRoute 53 → Hosted zone → delete A records for root and www
4Domain (optional)Route 53 → Registered domains — domains renew annually, cannot be immediately deleted