Some thoughts on DNS records and AWS

Written by Peter Eck

Orange sand and sandstone combine to show a beautiful rock formation in the desert

aws

dns

astro

s3

cloudfront

route53

networking

cdn

I was following the official deploy guide for Astro and AWS, which led me to an even deeper dive into the topic. I wanted to mess around with Astro to get a feel for its pros and cons. But the deployment process was so easy I decided to jump in and try it.

First you create a few S3 buckets for your domain and www subdomain. From there you have to setup the buckets for static web hosting. Since Astro builds conveniently to an index.html file I decided this would be a fun adventure to get a blog started by building a site with Astro.

What I didn’t realize was the domain I registered 2-3 years ago had already been configured with an A record. The way I’m thinking about A records, it’s almost like a redirect rule. I set up an A record on the petereck.com domain with a value of the static web hosting URL I got from S3. After I figured this out I was not only able to get it deployed easily, I was also able to seamlessly update that A record with my CloudFront distribution URL. This easily integrates a globally-available CDN that is supported by AWS’s infrastructure.

Networking has been somewhat of an albatross for me, so it’s nice to finally start to understand a thing or two about it!

Published on: Mon Jul 15