How To: Connecting Google Domains to Amazon S3

Step 1: Purchase your Domain Name

Step 2: Create an AWS account for access to S3

Step 3: Upload your website files to S3

  1. Create a bucket if you haven’t done so (blue Create bucket button) and use your domain name (example.com) as the bucket name.
  2. Enable Static Website hosting: navigate to your newly created bucket and click on the “Properties” tab under the breadcrumbs. Click on the box “Static website hosting” and select “Use this bucket to host a website”. Set your index document (generally index.html).
  3. Upload all of your website files to the bucket. The console has an easy drag and drop function. Don’t drag the directory that contains all of your website files; instead, navigate into that directory and select all of the files within it.
  4. Set the Bucket policy: inside the bucket, find “Permissions” tab (next to “Properties”) and click on “Bucket Policy”. Copy and paste the following code into the editor, replacing “example.com” with your domain name.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example.com/*"
}
]
}
Use this Bucket for Website Hosting
  • If you have a huge file directory, would recommend using an S3 Browser. It is a software that you download to the computer to communicate with your S3 bucket. It can manage the hassle of logging into the AWS console, deleting files, and uploading files (new or changed).
  • I had to upload several HTML files multiple times after making some changes locally. Not an issue for small sites, but it can get quite tedious for large applications.

Step 4: Head over to Route 53

  1. Create a Hosted Zone. Click on the blue button “Create Hosted Zone”
Enter in your domain name (without www) and leave Type as Public Hosted Zone
Click on “Create Record Set” to create Alias-type records

Step 5: Tell Google Domain where to send all requests to your website

  1. A single text field will appear. Click on the “+” button 3 more times to get a total of 4 text fields.
  2. Copy and paste each Name Server (NS) from the Route 53-Record Sets panel. Google Domains will strip the ending period that is included in the Route 53 record.
With the NS from Route 53

--

--

--

wife. product @airbnb. traveler. DIY-er at @imperfect.thread

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Helping web devs by developing various dark mode tools

EASY it is to start earning with the Mybotgarage futures trading platform.

Effective Communication Series — Email Etiquette

#AskVopani (December-2020 digest)

Proof-Carrying Code for Verifying Smart Contracts

How to Craft a Good ESG Strategy

Flink as a Service at JW Player

Know your limits Kubernetes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michelle

Michelle

wife. product @airbnb. traveler. DIY-er at @imperfect.thread

More from Medium

AWS for Games: Worth it?

A Problem with AWS ALB Stickiness

8 Cybersecurity Best Practices for Startups

How we build a successful virtualization stack in 2022