Appendix 2Assigning a Domain Name

The S3 endpoint URLs aren’t really intended for human consumption, so if you’re using them to access your application, you’ll want to get a better domain name if you intend to share this application with other people. Thankfully, S3 lets you easily associate a domain name with your bucket using a CNAME record.

Your domain registrar should provide instructions about how to create CNAME entries for a domain name. You’ll want to create one for the domain that shares a name with our S3 bucket. Just be sure to enter the endpoint (not the bucket name) as the value for the CNAME entry. The endpoint URL contains the bucket name and the availability region where it’s hosted, like this:

 learnjs.benrady.com.s3-website-us-east-1.amazonaws.com ...

Get Serverless Single Page Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.