There is a great write-up of what I consider a "standard" setup of a single-page app hosted on AWS: S3 Static Sites. It includes
- Deployment to S3
- SSL certificate via ACM
- Distribution via CloudFront
- DNS configuration in Route53
The site we are working on, however, is set up for a customer who does not use Route53. How do I tell them to configure the DNS records? It should be waterproof, so I want to check here with experiences from other users.
- Cloudfront domain name:
- S3 bucket:
Is it just a CNAME record?
spa.example.com. CNAME d12ab345cd6ef.cloudfront.net
Does that work? Is there an instance where this does not work? The setup does not use a naked domain.
Going through the domains set up with an A record and the Alias flag on Route53 pointing to the CloudFormation distribution, as described in the article linked above (section Route53), I see the following
$ dig working.foo.com ... working.foo.com. 28 IN A 184.108.40.206 working.foo.com. 28 IN A 220.127.116.11 working.foo.com. 28 IN A 18.104.22.168 working.foo.com. 28 IN A 22.214.171.124 ...