how to point AWS Route53 subdomain to AWS Lightsail instance? - amazon-web-services

I have setup a Wordpress on Lightsail, and have created a static IP which I can access WP ok.
I have migrated my .co.uk domain across to Route53 from another provider and am trying to point blog.example.co.uk to my Lightsail instance.
In Lightsail I have setup a DNS record like this:
A example.co.uk 12.34.56.78
A blog.example.co.uk 12.34.56.78
It then lists these DNS servers in Lightsail:
ns-849.awsdns-42.net
ns-1643.awsdns-13.co.uk
ns-341.awsdns-42.com
ns-1516.awsdns-61.org
I've taken those DNS servers and set on the root of my domain in Route 53 under Domains > Registered Domains
I am not sure if that was the correct thing to do, as I will have other subdomains eventually that will point elsewhere, should the Lightsail DNS servers be added at that level? If not, what do I set them back to be?
I have also created a Route53 Hosted Zone, and have created an "A" entry that links blog.example.co.uk to 12.34.56.78, is that required?

As mentioned in the comments, I was facing the same challenge.
What ended up working for me was simply creating an Alias Record (A) for my subdomain, subdomain.example.com, that points to the static IP of my Lightsail instance.
I did not add Lightsail's DNS servers anywhere on Route53.
I made sure that the NS entries for my root domain – example.com – pointed to the Name servers entries on my registered domain in Route53.
You can find the name servers associated with your Route53 registered domain by going to Registered domains > mydomain.com; they're located on the upper-right corner.

Related

Configure AWS CloudFront to be accessible from GoDaddy domain

I have a domain name configured into GoDaddy domain provider.
I created Angular application accessible using this cloudfront internal web address:
xxxxxxxxx.cloudfront.net
The question is how to configure the domain to redirect properly web requests to this address hosted on AWS. I contacted the GoDaddy support and they gave these instructions:
In order to make changes we need the nameservers and the nameservers will be provided by the host that is aws
Once you have the nameservers, Please open the dns page
You will see 2 nameservers that are for godaddy
Click on change option and then select I will use my own nameservers and then update the nameservers that will be provided.
Where I can see what are the names servers used in AWS Cloudfront?
You need to setup the domain in Route53 first (eg example.com), as part of the setup you get 4 name server addresses. You change the name servers at GoDaddy to your AWS nameservers as their support describe, which authorises Route53 to host your DNS. From then on you manage your DNS from Route53, not GoDaddy (but GoDaddy are still your registrar).
Once your nameservers point to route53 follow the docs on creating an alias in route53
If you want to use your own domain name, use Amazon Route 53 to create
an alias record that points to your CloudFront distribution. An alias
record is a Route 53 extension to DNS. It's similar to a CNAME record,
but you can create an alias record both for the root domain, such as
example.com, and for subdomains, such as www.example.com.
When you change the nameservers on GoDaddy any DNS you setup there will no longer be visible on the internet, only whats in Route53. Transfer any records you have created in GoDaddy to Route53 before changing your nameservers. Ignore any DNS records you didnt create.
If theres a problem you can goto GoDaddy and reset the nameservers back to default and that will restore the previous DNS.
One thing to mention - TTL - time to live. If DNS records have a high TTL (in seconds) it means when you make changes it will take upto that amount of time for everyone to get the update. The TTL will be visible in GoDaddy, or you can search "DNS dig" to find online tools that read DNS. The TTL of the NS records might be high (days, a week etc) - this will effect how long it takes Route53 to fully take over responsibility of your DNS.

Point domain to Route 53

I'm having issues to point a domain to a new server.
Currently our application is hosted in Google Clould.
We have a domain that is pointed to the public IP address of the Google Cloud instance and there is no other Google Cloud name servers attached to it. In our domain manager, we only have something like this:
domain.com A <google-cloud-ip-address>
We're moving this app to an AWS Beanstalk environment and these are the steps we did:
Setup the app in an AWS Beanstalk Environment
Create a Hosted Zone in Route 53
Add an A Record Set with an Alias pointing to the Beanstalk application
This is what we have in Route 53 now:
domain.com A ALIAS application-domain.beanstalk.com
domain.com NS nameserver1.aws.com, nameserverN.aws.com ...
domain.com SOA ...
Route 53 only gives me name servers, but the domain is currently pointed to an IP address, how should I proceed in this case to point the domain to Route 53, since I don't have any public IP addresses to replace it on my domain manager?
What I tried to do is: remove the current IP record from the domain manager and add all the AWS name servers but that didn't work.
Anyone had this experience and could share something with me?
Thanks.

How can we make DNS entries using Route53 to a domain hosted with an external (third party) domain provider

We have purchased a domain lets say "xyz.com" from a third party domain provider. We have our resources in two AWS regions and we want to implement failover between the two regions using Route53.
We have created a hosted zone with the same name as of our domain i.e. "xyz.com" and created record sets in the hosted zone with failover as the routing policy.
But as our domain is external the record sets are not getting reflected.
Please suggest a way to achieve failover using route53 with domain hosted with an external provider without moving the DNS to Route53.
You won't be able to do this without switching to Route53 to host your domain. Route53 must be able to control the responses to queries according to the records you have configured. You'll have to delegate your domain to Route53 by setting the NS records to the values provided in the Route53 console.
If you don't change your DNS Nameservers to Route53 then that zone will have no effect.
You could however register a subdomain in Route53, e.g. myapp.xzy.com, and delegate that subdomain/zone in your third party domain provider to Route53. You may also add a CNAME in the main domain pointing to a record in the subdomain.
To Summarise:
Create a Hosted Zone in Route53 for myapp.xyz.com
In that zone add the two DNS records with a failover policy
In the root domain DNS, add the AWS provided NS Records to delegate a subdomain. e.g.:
myapp NS ns-123.awsdns-09.net.
If you created Apex A Records/Alias in step 2, use myapp.xyz.com
If you created CNAMEs in step 2, use mycname.myapp.xyz.com; or shorten by adding a CNAME in the root domain to resolve to that address.
Hope this makes sense.
You need to point the name servers for your domain to AWS name servers.
Basically, below are the steps -
Login to the website from where you have bought the domain.
Go to the domain DNS settings for your domain on the website.
Name Server records NS records must be pointed to the website name servers, change them to the name servers you have from AWS route53.
Wait for at least 24 hours to reflect this change.

Route53 / Lightsail: www subdomain does not work

I've registered my domain on Route53, deleted the default hosted zone, and set the name servers to the ones provided by Lightsail. I've also set up a hosted zone in Lightsail with two subdomains: # and www. Both are A records that point to the static IP of my Lightsail instance.
The top-level domain works fine, but the www is giving an "IP address not found" error on my browser. What might be going wrong?
Turns out it just takes a while for the DNS to update.
You can use https://www.whatsmydns.net/ to check if DNS is updated.

Cannot set custom domain name with Route 53

I have a custom domain name, let's say example.co.uk. I originally purchased it through 123 Reg but have now transferred to Route 53. I have setup a Hosted Zone for that domain name.
I have been looking at many guides but for the life of me I cannot set the custom domain name, I can only access my site through the Elastic IP.
How can I get this to work?
Did you fully transfer the domain to Route53 or did you just change the name servers in 123reg to point to the Route53 name servers? If you fully transferred the domain, make sure you update the name server records in the Hosted Zone to match the name server records listed in the Route53 Registered Domains section.
To point your domain to your server you simply need to create an A record in the Hosted Zone that points to the Elastic IP. You also could have done that in 123reg without using Route53 at all.