Issues configuring AWS Route 53 for Elastic Beanstalk - amazon-web-services

I am attempting to use a domain registered with Amazon Route 53 to access an Elastic Beanstalk (nodejs) site. I originally had it working ok, but something broke and I can't for the life of me get it to work again.
In summary, I have:
An Elastic Beanstalk environment that is accessible via its url (i.e. ***.ap-southeast-2.elasticbeanstalk.com)
A domain registered through Amazon Route 53
A hosted zone in Route 53, with a document added with Type=A and routing traffic to the Alias (to my Elastic beanstalk environment)
I have edited the named servers in the registered domain to match that of the hosted zone
When I do a "Test Record" from the Hosted Zone, it returns "DNS response code No Error", and returns the IP address of my Elastic Beanstalk application. But, when i go to the URL I get "The Requested Host you requested is not resolvable."
As mentioned, I originally had it working. I then attempted to set up a redirect from http to https via Cloud Front, and managed to break it. I have subsequently removed all https & cloud front config in attempt to get the basic URL access working again. I suspect my issue is that I deleted my default Hosted Zone created by Amazon when I registered the domain, and I have a setting wrong.
Any ideas?

I never got to the bottom of this. Instead created a new elastic beanstalk environment, then reconfigured the domain and certificate to the new instance.
I have no idea what the difference is as all settings appear to be the same. But it at least gave me a way forward.

Related

Where to find domain name to existing EC2 instance

I'm new AWS and I have to continue maintaining previous developer service that is hosted on AWS. The ec2 instance that is hosted has map to domain name of https://****c.k**g.g***an.org.au, however I couldn't find this domain name anywhere. I tried looking at route53, but there's no such domain name registered.
Please help, how do I find the domain name that is mapped to the EC2 instance? Where can I get that information. The reason because I want to deploy a new instance but with the same domain name.
Edit: Masking DNS for privacy reasons.
Are you sure your DNS is hosted by Route53? Running dig against k***.g****.org.au has the SOA held by ns1.mooball.net.
The whois for mooball.net returns register.com as the owner, so I would consider reaching out to your internal teams to see who holds that account, then check your DNS delegation settings by logging in to register.com.
Often times the client will control their own DNS, so it would also be worth confirming with your client where their root DNS (garvan.org.au) is hosted - you can then trace the subdomain delegation to see where it is ultimately hosted.
check route53 service in AWS , since the domain is served by https..it could be the domain mapped to a load balancer and the load balancer has the instance...anyway you can know from the route53 there you find all the records

Route53 doesn't propagate to Elastic Beanstalk

I registered an .link domain name with Route53 and experimented a little bit with it.
First I created an record to route traffic to my S3 static webpage. After that I deployed an Elastic Beanstalk app and tried to route the traffic to the Elastic IP of my EB instance.
I am getting the whole time "no response" messages. When I do a test on the record set, I am getting the right IP in the "Response returned by Route 53" field.
I even done an whois request on my domain name, and nowhere were mentioned the information I entered during the registration.
Did I forget something or do I have to pay attention on something?
I noticed that the Domain name status code is blank for this domain name.
Like you, I'm using Route53 to route traffic to an Elastic Beanstalk instance.
In EB, under "All Applications", I have a running application with a URL ending in ".elasticbeanstalk.com"
Then, in Route 53, I have a record which routes a particular subdomain to my EB URL:
The blank Domain name status has nothing to do with the problem. The domain name works now and the Domain name status is still blank.
The problem was that the nameservers for the registered domain not matched the nameservers of the hosted zone. The support provided me the correct namerservers, I replaced the nameservers of the registered domain and the hosted zone with the one the support provided me and everything works fine.
Kind regards

ERR_NAME_NOT_RESOLVED Route 53 / Elastic Beanstalk

I have been trying to connect my domain with my elastic beanstalk instance.
My domain was purchased off GoDaddy and I have updated the nameservers to point to AWS and verified through dig. If dig comes up with the NS, it means GoDaddy is properly configured to point to the DNS right?
The Test Record Set function also does not show any error and has a proper response returned which has NOERROR
Problem is I still receive an ERR_NAME_NOT_RESOLVED everytime I try to load the website on browsers even tried on different devices
I have also checked the alias used in my Hosted Zone and its up and running
What I have already done:
Initialized and created Beanstalk environment - Up and Running
Public Hosted Zone - Created A record for www.mysite.com
GoDaddy DNS NS - updated with AWS 4 nameservers
Checks I have done:
Internal Test Record for A www.mysite.com
Dig Command
What could I be missing?
UPDATE***
So I figured "www.mysite.com' was working but 'mysite.com' alone was not. I'm assuming route53 will automatically use the www A record? But seems like its not?
Hope ya'll could help
Thanks!
Got it to work.
Looks like besides creating a www A record, I had to create a record for the root domain i.e mysite.com in the Record Set of my Hosted Zone
Solved!

AWS Route 53 aliased A record is causing 301

I have an Elastic Beanstalk application that I'm attempting to route a custom domain name to using a Route 53 hosted zone, i.e., mycustomdomain.com should route to fooelbapp.us-east-2.elasticbeanstalk.com. Within the Route 53 hosted zone, I've created an A Record with mycustomdomain.com as the name and a value of ALIAS fooelbapp.us-east-2.elasticbeanstalk.com. Now when I attempt to navigate to mycustomdomain.com, I receive a redirect to fooelbapp.us-east-2.elasticbeanstalk.com, which is not the expected behavior. The expected behavior is a 200 response and the page to load under the custom domain name, not the Elastic Beanstalk CNAME URL. Has anyone else experienced this issue?
The Elastic Beanstalk application is a WordPress 4.8.2 site on PHP 7.
Solution
#Mark B is correct, the issue was caused by my Site Address and WordPress Address being set to the Elastic Beanstalk CNAME URL, after correcting this everything works as expected and my custom domain name now resolves to the Elastic Beanstalk application without 301 redirecting.
Route53 does not issue HTTP redirects. What is happening is your application server thinks it is serving the domain fooelbapp.us-east-2.elasticbeanstalk.com, probably because that's the domain it finds when it starts up. So any requests it receives that aren't for that domain it is redirecting.
You need to configure your application to be aware of the actual domain name you want it to serve. How you would do that will depend on what web server you are using. If you need more help please provide more details about your environment.

How to set up custom domain for an app on Amazon EC2?

I am new in the Amazon EC2 world, I just created an app, that is located URL like this:
http://ec2-54-123-45-678.compute-1.amazonaws.com:8080
This is generated URL by Amazon EC2.
Now I would need to use my own domain name, so when I would access www.my-domain-name.com, I would like to see the content from
http://ec2-54-123-45-678.compute-1.amazonaws.com:8080
I bought the domain name on Godaddy.
Is there any way to do this in Amazon AWS dashboard or do I need to set it up in Godaddy system?
Thanks
I am answering on a more general level because I stumbled upon this thread when setting my custom domain.
In Amazon I created an instance and associated an IP to that instance. You were able to access it by typing in the amazon url
I actually used Media Temple not GoDaddy, but it will be similar. I went to the zone file and added that public url to the www
And as you can see, here is my blog actually working on the custom domain.
I set the wildcard because that way, no matter what someone types, if it is not set, then they will still see the site.
EDIT
For the root URL you should be entering your elastic IP and setting that as an A record.
First you need to set an ElasticIP for associated to that instance.
Then point the DNS entry of "www" for "my-domain-name.com" to the IP assigned in the step above.
Where you manage your DNS is another thing, can be in GoDaddy or in AWS Route53. You must adjust the delegation DNS in the "my-domain-name.com" register. Ex: your domain can be registered with GoDaddy but its delegation DNS point to Route53 so you can manage the domain from your AWS Console.
In order to setup DNS mapping you can map the existing IP 54.123.45.678 to ex: www.my-domain-name.com.
However, as you are running tomcat which is running at 8080 you need to forward the the request to the tomcat using Apache. So that you can visit www.my-domain-name.com without port 8080. If you are using linux box install Apache, apache-modjk and then configure sites.