We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

CloudFront With DNS

Your CloudFront distribution has a domain name like d1234567890abcdef.cloudfront.net, but that's a long, hard-to-remember address.

To make it easier for users to find your content, you can create your own DNS record that points a friendly domain name to your CloudFront distribution. Instead of typing that long CloudFront URL, users can type something like cdn.yourcoolsite.com.

If you're using Route 53, you can use an ALIAS (A) record instead of a CNAME. ALIAS records work better at the zone apex and are free. They're also a bit more plug-and-play within AWS if you're using CloudFront – but CNAME also works just fine.

However, ALIASing a CloudFront distribution requires using a public hosted zone. Because ours is private, we'll use a CNAME record.

Cost check: Adding this CNAME doesn't add a charge. Route 53 doesn't charge for queries to our private hosted zone, but the charge for having a hosted zone ($0.50/mo) still applies.

Assignment

In production, custom CloudFront domains also need to be configured as "Alternate domain names (CNAMEs)," usually with a matching certificate. For now, just create the Route 53 CNAME below.

Run and submit the CLI tests.