I have a Classic load balancer configured on my AWS webservices at xxx-xxx.amazonaws.com
and have also added route 53 to configure. But it seems there is no traffic moving from my domain to load balancer DNS. Need Help.
On my EC2 Server, I have added a MERN Stack application and used nginx to route the traffic from :80 to :8080. Next, a Elastic IP address is added to ec2 server.
A certificate is created using AWS's ACM and attached to the classic load balancer.
The domain records are handled by AWS's route 53. Domain name is aamchymumbai.com.
Thank you!
I did get a fix using CLoudfare.
Another follow up question, I have now. How to can I redirect domain.com to ec2-server.com:8080 and sub-domain.com to ec2-server.com:5000 using nginx + cloudfare?
I have a marketing website on wix with domain registered with godaddy, I've added a subdomain pointing to my EC2 IP for my app facing server, which works fine. Now I want to add a load balancer in front of that EC2 instance, however I cannot set the ELB A record in GoDaddy. Following this answer I created a hosted zone but if I change the name server I'll loose access to my wix website.
I want only the subdomain to point to my ELB while the main domain continues to point to the wix website, - do I need to change the name servers in GD to point to the aws hosted zone and then in the hosted zone map my main domain to the wix website and the subdomain to the elb? Do I need to move my domain registration to route 53 altogether?
What is the most recommended setup for this scenario?
Figured it out, writing for future help.
You need a hosted zone on route 53 pointing to the ELB, this gives you name servers. In GoDaddy add those name servers with your subdomain, keeping the existing name servers intact :)
I bought a domain with Google. I set up custom name servers to point the domain to Zeit.
Custom Name Servers
f.zeit-world.net
d.zeit-world.com
b.zeit-world.org
a.zeit-world.co.uk
Zeit controls the domain. I have spun up an EC2 instance with an elastic IP. I want to be able to point api.mydomain.com to the elastic IP using a CNAME.
added fake elastic ip just for example
now dns add mydomain.com api CNAME 194.119.279.121
I am not sure why it's not being resolved, obviously, I am missing some information. The URL api.mydomain.com just hangs.
Any insight into what step I am missing?
I have a Java/Tomcat application hosted in AWS ElasticBeanstalk and bought a domain from GoDaddy and the domain points to the IP of the EC2 instance. So when I hit, for example www.abc.com, it points to the AWS IP and the application opens.
I haven't used Route 53, as I am in free tier, I added the EC2 IP in GoDaddy.
Now I want to add HTTPS/SSL to the domain using Let's Encrypt.
I searched for the solution but I found that it is also done using GoDaddy cPanel, as I have hosted the application in AWS and just registered domain from GoDaddy, I cannot do this.
How can I achieve this ?
You will want to use an Elastic Load Balancer (also known as Classic Load Balancer). I know you don’t want to use a Load Balancer but this is free and the AWS best practice. Here’s more detail - https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-create-https-ssl-load-balancer.html
I've set up my application on AWS Elastic Beanstalk. I added a load balancer and pointed a CNAME for 'www' to it. But now I need to get root pointed there too. I can't use Route53 and use AWS nameservers because the client wants to use theirs. How can I get root to my app? Can I redirect the traffic? The tech lead I'm working with suggested setting up a server to do the redirect?
Since AWS ELB's only offer DNS Record (Instead of IPs) you need to use a CNAME mapping. However with DNS, CNAMEs do not allow root domain to point to it. To overcome this AWS has provided Alias Records (Custom implementation to AWS) to point root domain to ELBs.
If your client want to use their nameservers still you can use, AWS Route53 in between to solve this with following steps.
First create a Public Hosted Zone in Route53 for your domain.
Then create a record set inside the Hosted Zone for the root domain to point to the ELB with Type = A - IPv4 Address, Alias = Yes with ELB CNAME as for the Alias value.
In the external domain management service, create a NS record to point the root domain to Route53 nameservers.
Then when the DNS resolution happens, the root DNS query will first go to external nameservers(Managed outside of Route53) and then it will be forwarded to route53 where it will resolve the ELBs IP address and sent back.
You can set up a machine with a single static IP address that does nothing but redirect requests to the www host. Then you can put an A record on the bare domain at the apex of the DNS zone pointing to that machine.
There is at least one service, http://wwwizer.com/naked-domain-redirect, that will do this for you. (I'm not affiliated with this service, but it appears to do what it claims and will serve your purpose. There are probably others like it.)
Ideally, though, you'd persuade your client to change the authoritative nameservers to point to a Route 53 hosted zone that you create for them. They are still the registrant and "owner" of their domain, and can take control back from you by simply changing the nameservers to something else.
I generally persuade clients with the explanation that our load balancer infrastructure is integrated with the DNS servers so that if a balancer node fails, or we need to add or scale up capacity, or experience a traffic surge or DDoS event, the load balancer system will automatically update the DNS records for their domain to try to mitigate the issue and keep the site up. To do otherwise is to do things in such a way that removes those layers of redundancy.
Ideally, you can set up a apache server with a static IP, and install a free SSL certificate on that web server at first.
Second you need to redirect your root domain name request to AWS ELB.
Then go to your DNS management and set up your apex point to the server you created.
It is now possible to setup a Network Load Balancer and allocate one or more Elastic IP Addresses to it (one per Availability Zone). The Network Load Balancer can have an Application Load Balancer as a target. The Application Load Balancer would target the Elastic Beanstalk. An A record can then be created in the external DNS for each Elastic IP Address of the Network Load Balancer.
If you don't need the functionality that the Application Load Balancer provides, you may be able to target Elastic Beanstalk or whatever application directly from the Network Load Balancer.
Since AWS ELB's only offer DNS Record (Instead of IPs) you need to use a CNAME mapping. However with DNS, CNAMEs do not allow root domain to point to it. To overcome this AWS has provided Alias Records (Custom implementation to AWS) to point root domain to ELBs.
If your client want to use their nameservers still you can use, AWS Route53 in between to solve this with following steps.
First create a Public Hosted Zone in Route53 for your domain.
Then create a record set inside the Hosted Zone for the root domain to point to the ELB with Type = A - IPv4 Address, Alias = Yes with ELB CNAME as for the Alias value.