I have a domain that's hosted by a hosting provider. I'd like to configure a subdomain of it to use an AWS elastic IP address I have that's used by an EC2 instance. Here's what I've done so far, but it still doesn't work.
Created an A record for the subdomain on the hosting provider's server
Created a Route 53 public hosted zone
Added an A record for the subdomain to the Route 53 zone
All routing policies in the zone are set to "Simple"
Created 4 NS records on the domain registrar for the subdomain that point to the Name Servers the Route 53 zone uses
When I ping it I get "cannot resolve sub.domain.com: Unknown host"
Am I missing something?
Related
Can Aws public hosted zone work without a registered domain?
I created a hosted zone for the domain name e.g example.com. keep in mind I don’t own nor register the domain name, I just used it for the hosted zone. Then I created the record to route traffic to my elasticbeanstalk application. It didn’t work.
Did it not work because I didn’t own the domain?
I purchased domain name from GoDaddy. www.***ta.com
I am using AWS to host virtual machine (EC2 instance).
Now my web site is up and running on EC2 instance. I can access my webpage from public IP address.
I want to use domain that i purchased from GoDaddy www.***ta.com.
I follow online help
Create hosted zone add record set
Type A - with public IP4 in AWS Route 53 and public ip address of EC2 machine.
When i tested it works on AWS but not from the browser.
Anything missing? can you please provide some inputs?
You can either set the DNS records in godaddy DNS zone or Map the DNS servers to Route53 and then create the Zone file.
For setting DNS in Godaddy -
Go to Manage DNS and select your domain.
Add a A record - Enter the IP of your EC2 instance as value and # as key.
Add another CNAME Record - www as key value as #
After sometime your domain will start working.
For setting DNS in Route53 -
Go to Route53 and create a domain by entering your domain name.
In godaddy changethe DNS server 1, server 2, server 3, server 4 to the Name Servers received from Route 53.
after 24 hours your Domain name servers will start pointing to Route53.
Now come back to Route53 and add A record with your ec2 instance IP address.
I am trying to use the domain I just purchased in Route 53 to point to an application running in Elastic Beanstalk exy.elasticbeanstalk.com
If the domain I purchased is example.com and I want traffic to point to my application in Elastic Beanstalk, How can I achieve this?
So going to example.com launches the exy.elasticbeanstalk.com
In Route 53, alias records can be used at the root domain (also known as the zone apex) to refer to an Elastic Beanstalk Environment.
From Choosing Between Alias and Non-Alias Records:
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. Unlike a CNAME record, you can create an alias record at the top node of a DNS namespace, also known as the zone apex. For example, if you register the DNS name example.com, the zone apex is example.com. You can't create a CNAME record for example.com, but you can create an alias record for example.com that routes traffic to www.example.com.
See https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html
For for more details regarding Alias records and Elastic Beanstalk see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values-alias.html#rrsets-values-alias-alias-target
I have a domain (ex: example.com) which is configured and working fine with AWS Route 53 as below configuration
I have A record point to a AWS ELB for 2 EC2 instances (such as A and B which have tomcat 7 installed and configured).
Now I want to setup a subdomain like java.example.com which is pointing to another EC instance such as C but so far is not luck
What I have tried so far is
Try 1. Create another hosted zone such as java.example.com and then create A record which point to the IP of C ==> not working
Try 2. Create A record under hosted zone example.com with name as java.example.com and value is IP of C => not working
Please advice what I'm missing.
What you can do is create a CNAME record named java.example.com and point that to the EC2 instance.
If you want to use A record then create a Load Balancer, put your EC2 behind the load balancer and then use the DNSName of the load balancer as the value for your A record
Check here for more details https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html
Extract from above page is as follows
When Route 53 receives a DNS query for an alias record, Route 53 responds with the applicable value for that resource:
An Amazon API Gateway custom regional API or edge-optimized API –
Route 53 responds with one or more IP addresses for your API.
An Amazon VPC interface endpoint – Route 53 responds with one or more IP addresses for your interface endpoint.
A CloudFront distribution – Route 53 responds with one or more IP addresses for CloudFront edge servers that can serve your content.
An Elastic Beanstalk environment – Route 53 responds with one or more IP addresses for the environment.
An ELB load balancer – Route 53 responds with one or more IP addresses for the load balancer.
An Amazon S3 bucket that is configured as a static website – Route 53 responds with one IP address for the Amazon S3 bucket.
Another Route 53 record in the same hosted zone – Route 53 responds as if the query is for the record that is referenced by the alias record.
I have a domain for instance example.com.
The domain is hosted by a third party service (Digital Ocean).
I would like to give control of a subdomain to AWS.
So I would like to point aws.example.com to AWS.
Once the root subdomain is pointed to AWS. I would like to use Route 53 to setup the following functionality:
aws.example.com => alias to eb my-production-eb
dev.aws.example.com => alias to eb my-dev-eb
stage.aws.example.com => alias to eb my-stage-eb
Is this possible? Do I have to point my domains directly via cname record to the AWS load balancer?
Update 1:
I feel like I need to set the following in Digital Ocean:
aws.example.com => revoke control to AWS Route 53 somehow
*.aws.example.com => revoke control to AWS Route 53 somehow
Update 2:
The AWS documentation for Creating a Subdomain That Uses Amazon Route 53 as the DNS Service without Migrating the Parent Domain does not work for Digital Ocean.
Do not add a start of authority (SOA) record to the zone file for the parent domain. Because the subdomain will use Amazon Route 53, the DNS service for the parent domain is not the authority for the subdomain.
If your DNS service automatically added an SOA record for the subdomain, delete the record for the subdomain. However, do not delete the SOA record for the parent domain.
The question on Digital ocean regarding changing the SOA address titled "How can I change the SOA address in DNS settings?" states the following in one of the comments.
Unfortunately it is not possible to edit the SOA address right now
There is the ability to vote for this feature in Digital Ocean Configurable SOA record in DNS.
So my idea is that because you can't remove the SOA on Digital Ocean Amazon can't communicate to the domain correctly.
You need to delegate the DNS subdomain aws.example.com to Route 53.
See Creating a Subdomain That Uses Amazon Route 53 as the DNS Service without Migrating the Parent Domain
You can create a subdomain that uses Amazon Route 53 as the DNS
service without migrating the parent domain from another DNS service.
The basic steps are:
Create an Amazon Route 53 hosted zone for the subdomain.
Add resource record sets for the new subdomain to your Amazon Route 53 hosted
Update the DNS service for the parent domain by adding name server records for the subdomain provided in Step 1.
Assuming the current TLD example.com is hosted at Digital Ocean, then you need to create NS resource records there for the aws subdomain, using the name servers Route 53 provides you when create the hosted zone for aws.example.com.
Then you can control all hosts *.aws.example.com, including CNAMES for ELBs etc. from Route 53.
Yes, you can have any number of subdomains whether they are A or CNAME records, just point them to the target (public) IP.