Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon Route 53 Alias not working

For some reasons I am not able to set up my static website in S3. I am trying to resolve this from last 2 weeks but its not working for me.

What I have done is:

  1. Uploaded files within S3 bucket.
  2. Set up routing policy - thats fine.
  3. Alias target dropdown - I can see the S3 endpoints.
  4. Created Hosted zones.
  5. Set up both the alias with and without WWW.

Result - When I am typing URL in the address bar, it throws an error..either site is down or DNS related errors.

I tried implementing the same steps 6-7 times,No problems at all but domains are not working in the end. Absolutely clueless where I am going wrong?

like image 499
KapilS Avatar asked Dec 16 '14 15:12

KapilS


People also ask

How do I create an alias in Route 53?

AWS A Record Alias via AWS Route 53 ConsoleClick on your Hosted Zone Name of interest and go into the Resource Record Sets page. Click on the Resource Record (the A Record) for the Domain/Sub-Domain you would like to edit. On the right hand corner of the screen, you get to edit the Record Set.

What is alias in Route 53?

Amazon Route 53 alias records provide a Route 53–specific extension to DNS functionality. Alias records let you route traffic to selected AWS resources, such as CloudFront distributions and Amazon S3 buckets. They also let you route traffic from one record in a hosted zone to another record.

Is alias same as CNAME?

Understanding the differences The CNAME record maps a name to another name. It should only be used when there are no other records on that name. The ALIAS record maps a name to another name, but can coexist with other records on that name.

Why can't I access my website that uses Route 53 DNS services?

Check your DNSSEC configuration If DNSSEC is turned on for the domain but is turned off at the DNS service provider, then DNS resolvers that perform DNSSEC validation return a SERVFAIL error to clients. In this case, clients can't access the domain if they are using a DNS resolver that performs DNSSEC validation.


2 Answers

Your hosted zone and domain name servers could be out of sync:

In Route 53, verify the Name Servers (NS) generated by your Hosted Zone match what's listed under your Registered Domains.

SCREENSHOT: AWS Route 53 Top Left Menu - Hosted vs Registered Domains

  1. Click on "Hosted Zones"
  2. Select your domain (example.com)
  3. Select the "Record Set" with type NS
  4. Copy each line item / name server from the value box

    ns1.amazon.com

    ns2.amazon.org

    ns3.amazon.net

    ns4.amazon.co.uk

  5. Now click on "Registered Domains"

  6. Select your domain

  7. Past each entry in the upper right hand corner

SCREENSHOT: Paste example.com Name Server Entries

like image 104
Shane Gramlich Avatar answered Oct 12 '22 04:10

Shane Gramlich


The major steps to create an Amazon Route 53 alias to an Amazon S3 bucket are:

  • Create a bucket with the DNS name (eg images.my-company.com) -- note that the Bucket Name must match the DNS that you wish users to enter when accessing the URL
  • Activate Static Website Hosting on the Amazon S3 Bucket
  • In Route 53, create a Hosted Zone or use an existing Hosted Zone
  • Create a Record Set in the Hosted Zone
    • Name: Match the subdomain to the name of your S3 Bucket
    • Type: A
    • Alias: Yes
    • Alias Target: Select your S3 website from the pull-down list

See: Setting Up a Static Website Using a Custom Domain

The most important part is that the Bucket must have the same name as the Route 53 domain name (eg images.my-company.com).

If problems are experienced, first try to access the content via the Static Website URL. If that works, resolve the URL (eg via DNSLOOKUP or PING) and compare the IP address to a resolution of your domain name. They should both return the same IP address.

like image 36
John Rotenstein Avatar answered Oct 12 '22 04:10

John Rotenstein