Hosting a Static Site with AWS
Written By: Ben Labaschin\ Last Edited: 2/16/23
Domains
- Buy a domain either on AWS Route53 or somewhere else such as Google Domains.
AWS Domain
- Go to Route 53, "hosted zone", "create hosted zone"
- provide domain you've purchased
- Make private hosted zone
-
press "Create hosted zone"
-
AWS Amplify, "new app", "host web app", GitHub
- Authorize GitHub, click the repo you'd like to host, allow AWS amplify to provision
Google Use Case: Do Not Recommend
- AWS Amplify
- Go to "Domain Management"
- Click on Actions and select "View DNS Records"
- Follow step 1 and place CNAME record into Google Domains Resource records
- Click on "Export DNS Records" and export to bind
- Go to Route 53 and click on Hosted zones
- Go to your hosted zone and Import zone file
- Paste contents of zone file
Because google doesn't support alias records, we need to set up sub-domain forwarding. Go to the website page for your google domain, click forward-domain and forward the website to... (what?)
- Go to Route 53 and create a hosted zone. Copy the four namespaces, used for next step.
- If domain hosted by google, go domains.google,.com -> select your domain -> Select DNS -> Custom Name Servers
- Under custom namespace servers select "Manage name servers" -> add each namepsace server from the first step into four separate rows. Press save.
- At the top of the screen, select "switch to these settings"