简体   繁体   中英

Failing to Redirect Subdomain with Route 53 to Elastic Beanstalk Environment

Aim: To set-up a subdomain that redirects to an elastic beanstalk instance

I recently bought a domain (tscthub.co.uk) from GoDaddy, transferred it over to 'AWS Route 53' via GANDI, and am waiting on SSL to be approved via 'AWS Certificate Manager'.

Separately I created an 'AWS Elastic Beanstalk' application running Metabase using this guide . This is up and running and I can successfully access it. Whilst the metabase env url works nicely, the public IPv4 address and public IPv4 DNS don't load anything when I follow them.

Next I tried to follow the "Routing traffic to an AWS Elastic Beanstalk environment" guide on the AWS docs. In 'AWS Route 53' I first created a new public hosted zone for 'tscthub.co.uk'. I edited the named servers in the registered domain to match that of the hosted zone. Then because my 'AWS Elastic Beanstalk' environment url had the region within it I thought I could use an alias as per the guide, however, upon trying I got the error "an alias to another record in the same hosted zone are global and available only in US East (N. Virginia)" and unfortunately I'm using 'eu-west-2' ( this comment talks about this issue in more detail).

I therefore just used the backfall approach of creating a new CNAME record where the record name was 'test.tscthub.co.uk' and the value was 'http://metabase-env.eba-i2ysq7n4.eu-west-2.elasticbeanstalk.com/'. After waiting a couple of hours for everything to reroute I then tried to access 'http://test.tscthub.co.uk/' but I just get "This site can't be reached".

It turns out that what the "Routing traffic to an AWS Elastic Beanstalk environment" guide fails to mention is that you can just create an "A" record and set that to the elastic beanstalk environment...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM