AWS ELB and GoDaddy Domain working - amazon-web-services

I have registered a domain in goDaddy.com and want the traffic to be sent to AWS route53. I have a ELB created I did the following steps
In Route 53, created a HostedZone for my godaddy domain name which in turn gave me a NS record with 4 amazon DNS server names and an SOA record.
Created a new "A" record with just the naked domain and Aliased it with Elastic LB
In godaddy , in DNS management, If I use the ELB DNS name for "A" record, I get an error "Enter a valid IP address" where as if I give the EC2 public IP address for "A" record , I can see the index page . I have still not given the 4 NS record DNS server names in godaddy.
Questions :
How do I use ELB instead of using EC2 Public IP.
If I use the NS values, does that means the domain is ported to AWS Route53 and I will be charged every month at AWS? If I use the EC2 IP address only in goDaddy ,then I will not be charged by AWS ?
Hope I am clear on my question, if not please let me know I can explain further

First of all AWS ELB does not provide a A record with an IP address and instead it provides a CName. Unfortunately a CName cannot be mapped to a naked domain in DNS configurations and as a work around, AWS provides an Alias for A record.
However using Godaddy DNS, Alias to AWS resources such as ELB is not possible which limits using naked domain mappings to ELB. Therefore you need to delegate DNS management to Route53 hosted zone(Or atleast for the naked domain) having the name server forwarding which cost you around $0.5 per hosted zone month for the first 25 hosted zones.
Since an IP address is available for an EC2, if you directly point an A record in Godaddy, it won't cost for DNS at AWS.

Related

Connect AWS Hosted Zone To Registered domains

I want to connect my domain (in AWS Registered Domains) to the IP address of my Ec2 instance in my AWS account; so that I can type www.my-domain.com in any browser and open my website.
I transferred a domain name from my old AWS account to a new one. Usually AWS creates a hosted zone for the domain automatically, but it didn't.
So I created my own hosted zone and and added and two A records (www.a.com and a.com) with value connected to the IP address of my Ec2 instance but the browsers didn't recognize the domain.
So I tried:
Updating the Name servers of the hosted zone to be the same as the domain name NS But same result
Updating the Name servers of the domain name to be the same as the hosted zone NS But same result
What can I do?
Thanks.
As long as the domain registrar is AWS (you can validate this by running whois against your domain) the setup should be quite simple.
Firstly it might be worth creating a new hosted zone if you've modified the NS records for it. It is important that these values are the original domains that AWS entered against the values. Also ensure the hosted zone is a public hosted zone.
Copy each of the nameserver values from your public hosted zone (there should be 4 in total). Then on your registered domain in the Route 53 console, edit the nameservers replacing the values with the values that were taken from your hosted zone. Once you have done this the new public hosted zone will be used by your domain.
Depending on any TTL caching you might find it can take a little time for clients to use this nameserver but you can test it by using a DIG command to find the NS value using an external server or the web service offered by google.
I don't know if this could count as and answer but this is what I did to fix the problem:
I created and Application Load Balancer
With Security Group with Inbound rules: HTTP TCP 80 0.0.0.0/0, ::/0
And Target Group TCP 80 Set to Ec2 instance.
Connect the A record to the ALB
This fixed my problem

AWS EC2 hosted website map to domain name from godaddy

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.

What do I put under A record apart from nameservers for hosted zone?

I have a domain registered with godaddy.
On AWS, I've set up the instance, load balancer with SSL, and a public hosted zone.
I tried inputting the nameservers but I still need to input an A record. The problem is that godaddy won't allow me to put in the A record provided by AWS (dualstack.acthttp-617756314.us-east-2.elb.amazonaws.com.) instead it requires me to input an IP address only.
What value should I put for the A record, along with the 4 Route 53 nameservers to my domain point properly to my load balancer?
If you are using Route53 for the name servers, then setup the A record in Route53, not Godaddy. Route53 will allow you to setup an A record ALIAS that points to dualstack.acthttp-617756314.us-east-2.elb.amazonaws.com.

How to make DNS ARecord point to AWS elastic beanstalk load balancer?

I have a load balanced environment (min nodes 2, max nodes 4).
The DNS CNAME points to the AWS DNS name for the Elastic Beanstalk, e.g...
awseb-e-a-awsebloa-XXXXXXXX-YYYYYYY.eu-west-1.elb.amazonaws.com
My DNS A-record points to the static IP (elastic IP) of the first EC2 instance (I manually associated the EC2 IP address).
This means anyone referencing www.mydomain.com will go through the CNAME and therefore will be load-balanced.
Anyone accessing without the www prefix (mydomain.com) will go through the A-record and hit the first EC2 instance.
My question is, how can I make the A-Record point to the Elastic Beanstalk instead? I don't want to type its current IP address - because that could change, but I'm more than conscious that pointing to a single node isn't great either.
Since the IP address of the ELB may change time by time, you should create an Alias record with Route53 instead.
https://aws.amazon.com/route53/faqs/#which_dns_records_are_supported
Additionally, Amazon Route 53 offers ‘Alias’ records (an Amazon Route
53-specific virtual record). Alias records are used to map resource
record sets in your hosted zone to Amazon Elastic Load Balancing load
balancers, Amazon CloudFront distributions, AWS Elastic Beanstalk
environments, or Amazon S3 buckets that are configured as websites.
Alias records work like a CNAME record in that you can map one DNS
name (example.com) to another ‘target’ DNS name
(elb1234.elb.amazonaws.com). They differ from a CNAME record in that
they are not visible to resolvers. Resolvers only see the A record and
the resulting IP address of the target record.

How redirect a domain to Amazon EC2 Machine?

I'm using EC2 of Amazon to host a website built in JSP :
http://ec2-50-17-144-64.compute-1.amazonaws.com:8080/p2p
And I bought this domain:
www.p2pbrasil.com
How can I redirect www.p2pbrasil.com to my website in Amazon EC2 ?
When someone type www.p2pbrasil.com it redirects to http://ec2-50-17-144-64.compute-1.amazonaws.com:8080/p2p ?
You need to do two things
In the Amazon Web Service admin panel, create an elastic IP in the same region as your instance and associate that IP with your that instance (IPs cost nothing while they are associated with an instance, but do cost if not).
Add a A record to the DNS record of your domain mapping the domain to the elastic IP address assigned in (1). Your domain provide should either give you some way to set the A record (the IP address), or it will give you a way to edit the nameservers of your domain.
If they do not allow you to set the A record directly, find a DNS management service like ZoneEdit, register your domain as a zone there and ZoneEdit will give you the nameservers to enter in the admin panel of your domain provider. You can then add the A record for the domain in ZoneEdit.
I only mention ZoneEdit because the basic service is free, you could also use Amazon route 53 or a similar pay-for service, if you preferred.
Create an Elastic IP on the AWS Panel, then associate it to your instance.
Then use a DNS management service to add your domain and Ip address (Elastic IP), then on the domain provider panel add the DNS provided from the DNS management service.
I recommend EntryDNS which is actually free.
As you have your server on AWS best option is to use Route53 hosted zone.By doing this you can manage all your DNS entries using AWS. In future if you plan to use ELB's for your application, you can various traffic routing options using Route53.
Create Hosted Zone and get the name servers.
Replace current name servers with AWS nameservers from your Domain registrars DNS entries.
Create an A record in AWS hosted zone and give your servers IP (Elastic IP) as value.
For detailed instruction, you can follow this blog post. Mapping Domain Name to EC2 Server
Assuming this is a hobby website and your domain registrar isn't AWS.
If your registrar (for example godaddy.com) provides a DNS manager you simply need to add a CNAME record for www that points to the aws public DNS record for your instance. For example ec2-50-17-144-64.compute-1.amazonaws.com
This will make http://www.p2pbrasil.com display the same content as http://ec2-50-17-144-64.compute-1.amazonaws.com
Doing it this way you don't have to pay for an elastic IP, which is a dedicated resource. Your IP on your ec2 instance shouldn't change but could if you restart your instance.
Put the public IP from your EC2 instance as an A name to your root domain in Route 53 hosted zone.
This change might take some time.