Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS - Create a record set for an s3 static website

I have a static website up and running at

http://volcalc.s3-website-ap-southeast-2.amazonaws.com/

It is stored on an aws S3 bucket.

I have bought the domain volcalc.io

I just want to switch to use that as the url of my website.

I'm following the instructions here. I'm doing "Create record sets".

I'm trying to create a record set but when I check the radio button "yes" for "alias" then I try to enter an "alias target" there are no options to select from and the tutorial is saying there should be:

enter image description here

So I just tried to paste in this: http://volcalc.s3-website-ap-southeast-2.amazonaws.com/

and click create but it says:

The record set could not be saved because: - Alias Target contains an invalid value.

What do I enter into alias target? Why aren't there any options to select from?

like image 258
BeniaminoBaggins Avatar asked Apr 09 '17 09:04

BeniaminoBaggins


3 Answers

Steps required:

  • Create a bucket with the name of the desired domain (eg A bucket called volcalc.io)
  • Turn on Static Website hosting
  • Create a Route 53 record set with Alias=Yes and select the static website from above

See: Routing Traffic to a Website that Is Hosted in an Amazon S3 Bucket

like image 40
John Rotenstein Avatar answered Oct 01 '22 03:10

John Rotenstein


I know you might have solved the issue, but for the people who see this post:

If you cannot find the endpoint on the list, simply copy and paste it there.

Also you would need to remove the bucket name from your end point.

only input this part: s3-website-ap-southeast-2.amazonaws.com/

Route 53 will find a bucket that has your exact domain name.

like image 20
Arman Fatahi Avatar answered Oct 01 '22 02:10

Arman Fatahi


You will need to point your alias record to the resource, not the endpoint :

ALIAS : s3-website-ap-southeast-2.amazonaws.com

like image 71
madacoda Avatar answered Oct 01 '22 02:10

madacoda