How to route domain to elastickbeanstalk? - amazon-web-services

I have running app in elastickbeanstalk on domain:
secret-development.eu-central-1.elasticbeanstalk.com
And I would like to route my domain into this app.
I created CNAME www to secret-development.eu-central-1.elasticbeanstalk.com
But it is not working.
What is wrong?

I created CNAME www to secret-development.eu-central-1.elasticbeanstalk.com
Unfortunately, you can't create working www CNAME record to the default EB domain. The reason is that this is AWS owned domain and you have no control over it.
If you don't want to use AWS provided domain for you EB environment, you have to create/buy your own domain, e.g. mydomain.com. This can be done in Route53, but can also use any other domain seller.
How to use Route53 to setup a custom domain for EB is explained in the following AWS documentation:
Creating an Amazon Route 53 record that routes traffic to your Elastic Beanstalk environment
If you have your own domain (e.g., mydomain.com), then you can also setup a subdomain (www.mydomain.com) for it and point it to EB environment.
Having your own domain will also enable you to setup https to your EB environment.

Related

Route .nz domain to elastic beanstalk (can't use Route 53)

I've got a website hosted on elastic beanstalk and a .nz domain on www.sitehost.com.
I need to route the domain to the website. All the documentation I'm seeing tells me to transfer the domain to Route 53... but you can't use .nz domains with Route 53.
I've had a look at setting up DNS records on my current domain host but I'm not 100% which records/information need to be added. Is it as simple as adding DNS records? Or can you only route elastic beanstalk websites through Route 53 and do I need to take my website off AWS and host somewhere else??
Appreciate any advice!
Cheers,
Daniel.
Is it as simple as adding DNS records?
Depends on the capabilities given to you by sitehost and what is your domain. If you want to point subdomain (e.g. www.mysite.nz) to EB, just use CNAME record. If you want to point root domain (e.g mysite.nz) CNAME can't be used, and you may need to contact sitehost if they have any special/custom records for root domains.
Or can you only route elastic beanstalk websites through Route 53 and do I need to take my website off AWS and host somewhere else??
You can host it on AWS. But if the sitehost does not allow you to create CNAME or other records, then you can setup Route53 as your DNS service. This is different then migrating a domain. Your domain is still in sitehost, but all its records are managed by R53. This requires you to setup NS records in sitehost. But again, it depends if sitehost allows you to do it.

Cloudflare configuration with AWS Elasticbeanstalk

I'm trying to configure cloudflare dns to point to an elasticbeanstalk application.
Most of the tutorials are using route53 but I'm trying to see how it'll work with cloudflare
I bought a domain: myapp.com and it's already pointing to the cloudflare nameservers.
On the cloudflare there's NO dns record right now.
I can access the eb app by url :
myapp-env.eba-uistqmhg.ap-southeast-1.elasticbeanstalk.com
so how do i point myapp.com to the eb app ?
Do I simply add a CNAME that points to the eb url or I need to use the eb ipv4 instance?
You can add a CNAME for myapp-env.eba-uistqmhg.ap-southeast-1.elasticbeanstalk.com. After making the change, it might take few minutes for the DNS to propogate.

Linking GoDaddy with Elastic BeanStalk

So I just bought a domain with godaddy www.abc.com (example)
I have then uploaded my flask back end and successfully deployed it to elastic beanstalk.
The elastic beanstalk has given a url as elastic-region.com.
However this url is HTTP, therefore
I have then created a certificate for www.abc.com
Now the problem is I cannot link my godaddy to my elastic bean server.
I have set up the CNAME where Name = www and Value = elastic-region.com.
As well as the certificate as name = xyz value = yzx
After all the configuration I still am not able to connect it to the elastic bean. When I enter the url www.abc.com it redirects be back to godaddy account page
I would suggest moving your DNS to route53 DNS service. You can do this by adding a hosted zone in route53 and changing your name servers in GoDaddy. In Route53 you can directly alias towards your elastic beanstalk environment on A / AAAA records.
If you want to continue hosting your DNS at GoDaddy; I would suggest using tools like https://mxtoolbox.com/ to verify if your DNS is set correctly. The method you described in your post would be sufficient to CNAME towards your EB environment.
AWS resource to create an alias towards Elastic beanstalk:
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-beanstalk-environment.html#routing-to-beanstalk-environment-create-alias-procedure
Some resources to help you change nameservers:
https://www.godaddy.com/help/change-nameservers-for-my-domains-664
https://virtualizationreview.com/articles/2020/07/14/migrating-dns-services-aws.aspx
you can also move your whole domain to AWS;
https://blog.shikisoft.com/transferring-domain-registrations-from-godaddy-to-amazon-route-53/

AWS EB - How to map a subdomain to CNAME, and www to another CNAME?

I've never done any kind of domain setup before, so I'm just following the AWS documentation.
I've purchased a domain on Google Domains. I've got my REST API application deployed on AWS ElasticBeanstalk. I've also got my front end application deployed there, but for now I just want to deploy my REST API.
Is this possible?
www.mydomain.com CNAME my-frontend-app.some-az.elasticbeanstalk.com
api.mydomain.com CNAME my-rest-api-app.some-az.elasticbeanstalk.com
*.mydomain.com -> redirect -> https://*.mydomain.com?
Are these things something I have to do in the Google Domains console? Here's what the console looks like:
The first two options should be possible using Google Domains console
www.mydomain.com CNAME my-frontend-app.some-az.elasticbeanstalk.com
api.mydomain.com CNAME my-rest-api-app.some-az.elasticbeanstalk.com
*.mydomain.com -> redirect -> https://*.mydomain.com is not only a DNS configuration, it involves using SSL certificates and redirect from port 80 to 443. For this step, you can create a AWS CloudFront Distribution and map the distribution CName to *.mydomain.com in Google Domains console. Since AWS provides free SSL certificates, you can configure and attach it to CloudFront and do the redirection from there.

New domain on aws elastic beanstalk

I have a nodejs app running on elastic beanstalk. I have a domain registered through GoDaddy and a cname that points to myapp.elasticbeanstalk.com.
1) Can I point my domain to aws nameservers, instead of mapping that domain to the domain that eb has set up?
This is how I would like to set up my domain, but when I attempted to, it wouldn't work (and I'm not sure why). I checked DNS propogation, and things looks good, but when browsing to my domain, things wouldn't work.
2) Can I set up subdomains to work with elastic beanstalk? (eg. sub.example.com)
I read somewhere that subdomains cannot be set up in elastic beanstalk, but I don't understand why this would be. I'd like to have one app running at sellers.example.com and one at buyers.example.com. Can I do this with eb? If not, can I set this up on an ec2 instance and configure it myself?
For (1), if elasticbeanstalk.com name servers will respond to requests for domains under elasticbeanstalk.com domain.
You can checkout the following guide on how to setup your custom domain name to point to your elastic beasntalk app:
http://compositecode.com/2014/01/23/mapping-domain-names-w-name-com-and-amazon-route-53/
For (2), if you have two environments myenv1 and myenv2 then you can set up custom cname prefixes for each environment like myenv1.elasticbeanstalk.com and myenv2.elasticbeanstalk.com. What kind of subdomains would you prefer?
If these are sub domains under your own domain, I guess you could set them up depending on your DNS hosting provider.