AWS Route 53 Subdomain works intermittently - amazon-web-services

I have some strange problem with AWS Route 53 subdomain.
My main domain points to an AWS EC2 instance. I created another EC2 instance to host my dev environment. I want to access my test instance from a subdomain.
To do that, I created A records with my elastic EC2 test instance with 1day TTL.
The really strange thing is that sometimes it works, sometimes it doesn't.
Just checkout the global propagation state of my subdomain and refresh the page (without cache) to see it changes every second.
What am I missing ?

This site is showing several issues with your DNS setup you should probably investigate further: http://mxtoolbox.com/domain/dev.tidybear.fr/

Related

Why am I get CGI default page whenever I try to access my AWS instance

I'm new to AWS EC2 hosting, I have created an instance that has a 'cPanel-WHM for Linux' security group name; by using amazon Route 53 I have set a hosted zone, which I use to link with my domain from NameCheap. My domain from Namecheap is pointing to this hosted zone which has an A record pointing to the IP address of my instance. I have logged in to Cpanel direct by using an IP address with port:2087 and adding an index.php file that contains some simple code to display the welcome note. but whenever I go to this domain I get the default CGI page
"cgi-sys/defaultwebpage.cgi"
I have checked my DNS propagation and I have seen the DNS is propagated. I have tried several times, I thought there was a place I mess with instance settings but ended up with the same problem. Is anyone have any idea what is going on? Thanks in advance

Issues configuring AWS Route 53 for Elastic Beanstalk

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.

Cannot route traffic to AWS Elastic Beanstalk environment using Route 53 and custom domain under the same account of AWS

I have been trying to host our php website using Elastic Beanstalk however I had no luck under Hosted Zones. Domain is registered with the same AWS account.
Things I did:
Created a hosted zone named mycustomdomain.com
Created a A type record set with ALIAS to my environment. (Selected through drop down of AWS itself.)
The domain name of EB Environment
environmentname.randomclashofcharacters.region.elasticbeanstalk.com
assigned by AWS works flawlessly so I can say that there is nothing wrong with the config at Elastic Beanstalk side of things.
I followed through the guide uploaded by AWS themselves
I see one weird thing that might be causing that. The name servers listed under domain name is different from ones listed in Hosted Zone. Should I change them. AWS guide doesn't says to do so, so I didn't do it.
Thanks for your help beforehand.
Cheers,
~bio
Thanks to corrective help from #heplalump the problem is resolved. I actually needed to make domain's name-servers same with the hosted zones. Still cannot reach from desktop Safari but reachable via chrome and iPhone safari. If you want to do this procedure for yourself just follow the guide amazon provided.

How to link an Amazon EC2 instance of a jupyter notebook to a Namecheap subdomain?

I need some help linking a newly created Amazon EC2 instance to a Namecheap subdomain. For the purposes of this question, we'll say my website is called example.com. Currently, example.com is linked to a Github Page (I've added two A records and a CNAME record per these instructions). I now want to create a subdomain called notebook.example.com, which should point to my EC2 instance that is exposing a Jupyter Notebook (which I created per these instructions). So far, I've:
Created an Elastic IP Address and assigned it to the EC2 instance (let's say it is 55.101.38.114).
In Route 53, I created a Hosted Zone (none existed) and created a Record Set with name="notebook" of type A and the value=55.101.38.114.
This is where I'm stuck. On Namecheap, I created a URL Redirect Record with Host=notebook and value=https://55.101.38.114:8888/ with masking, but when I type https://notebook.example.com, it hangs up on "Connecting ..." and ultimately says "This site cannot be reached." Where did I go wrong?
EDIT:
I've almost answered by own question by connecting to http://notebook.example.com instead of https://notebook.example.com. Also, I am able to connect if I turn off masking. Is there any way I can still connect with masking? I'd like to see the jupyter notebook at notebook.example.com rather than it redirecting to https://55.101.38.114:8888/.
EDIT #2:
Route53 setup
Namecheap setup (I removed the URL Redirect)
The solution was to add NS records for the nameservers from Route 53 in Namecheap. I also added an A record in Namecheap with the EC2 instance's elastic IP. I still have to specify the port to connect (notebook.example.com:8888).
This is what Namecheap should look like:
Thanks to #JohnRotenstein.

Pointing sub domain only to AWS EC2 instance?

I am trying to migrate a PHP site to AWS.
I have created an instance with a specific AWS url and have configured an AWS Route 53 service.
Looking at the docs here: http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html#root-domain-walkthrough-update-ns-record
It says to update the Nameservers for the particular domain, however that would affect the live version of the site which is still being hosted on Digital Ocean.
What I want to do is:
Point a subdomain e.g. dev.mysite.com to the dev environment on AWS
Check everything is ok
Create a live environment on AWS
Point mysite.com to the live environment.
I am still new to this way of hosting, is what I am trying to achieve, feasible.
Or is there another way I should be tackling this.
Any suggestions welcome.
Thanks
That's absolutely fine. Within Route 53, you can create an a record for your Apex (www.site.com) to point to your EC2 (?) instance, and then another CNAME record which points to your dev.site.com
Note that Alias records are free, and the preferred way of doing the above, but only work with certain types of AWS resources such as ELBs.