New domain on aws elastic beanstalk - amazon-web-services

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.

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.

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.

External subdomain pointing to Elastic Beanstalk environment

In this particular case, I have a domain in a different provider (other than AWS) and an Elastic Beanstalk (EB) application with multiple environments that each use different resources.
From the domain provider, I've created a subdomain named - test.tiagoperes.eu.
What I want is that by going to this subdomain, any user would see what's currently found in the EB environment named production which is currently accessed in (app-prod is not the real name but follows a similar pattern)
app-prod.eba-xepr49ar.us-east-1.elasticbeanstalk.com
This is an environment with Auto Scaling Group, Target Group and Load Balancer.
What must be done?
Note: There's a similar question but it is very general (hence the variety of answers). Also, there's this question used in a basic EB environment. Also, I've looked at this guide.
Based on the comments.
The OP uses external DNS provider (not AWS Route53). Thus, CNAME record, or equivalent in the external provider, should be created for the subdomain. The record should resolve to the default name of on ElasticBeanstaslk.
Since the DNS provider is external to AWS, there is no need to do anything at the AWS.
In more detail, in the DNS manager of the domain, create a CNAME record for the subdomain. For example, if the EB subdomain is: app-prod.eba-xepr49ar.us-east-1.elasticbeanstalk.com then we should have a CNAME entry for app-prod.eba-xepr49ar.us-east-1.elasticbeanstalk.com. According to Mark B
We should never be pointing directly to a server/IP address with Elastic Beanstalk (EB), it should always be using the DNS endpoint Elastic Beanstalk provides.
Depending on the DNS host we are using, one can add the CNAME record ourselves, or we may need the host to add it for us. As examples, how to do it in Namecheap and GoDaddy is explained in their docs:
How to Create a CNAME Record For Your Domain
Add a CNAME record

Q: AWS Beanstalk default domain wildcard cname prefix

I would like to have wildcard domains for an auto-scaling application running on AWS Beanstalk.
I cannot use a custom domain with Route53 or alternatives, so I am forced to use the default generated domain format, eg: environment-name.elasticbeanstalk.com.
I would like to have something like this *.environment-name.elasticbeanstalk.com configured at the load balancer level for my setup.
Does anyone know if there is a way to specify a wildcard domain prefix for the beanstalk applications running with the default domain?

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.