External subdomain pointing to Elastic Beanstalk environment - amazon-web-services

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

Related

redirecting a subdomain to google cloud

I have domain under which there are multiple subdomains pointing to different websites hosted on azure. I am starting to explore google cloud and want to host a subdomain on google cloud.
Below is how DNS record should look like
A - GO Daddy hosted main website IP address
CNAME - subdomain.example.com - subdomain.cloudapp.net
CNAME - subdomain2.exapmple.com - subdomain2.cloudapp.net
now I want to add a cname for another subdomain to be hosted on google cloud
CNAME - subdomain3.example.com ??.googleapi.com
I have public IP address from GCP, but how do I get subdomain for GCP to be used for CNAME record? As per answers to my another question GCP does not provide public CNAME for VM instances. So what should I provided in CNAME record. (I do not want to move the DNS to google, or to azure for that matter)
Based on your question and the reference to Google not providing names for VM instances, I am assuming that you are trying to create a DNS record for the external address of a VM instance.
If you have a static IP address, you should just configure your DNS provider to use an A record for that IP address, rather than a CNAME.
CNAME records just create aliases for the target names, where A records can point directly to the correct IP.
Note that if the IP on your instance is ephemeral rather than static, then you would need to keep updating the DNS record whenever you restart the instance (and get a new IP), so it would be highly recommended to use a static IP for the instance in this case.
I often use App Engine, for a CNAME, you have to map to ghs.googlehosted.com (https://cloud.google.com/appengine/docs/standard/python/mapping-custom-domains).
It seems possible to do the same on Compute Engine through the network service (https://cloud.google.com/dns/docs/quickstart#create_a_cname_record). If you don't really need the CNAME record, you should use the classical A record. It's a bit easier.
Don't hesite to look into documentations, everything is explained.

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

Custom client domains for my web service

I have a web service running on EC2 behind an elastic balancer. I would like to allow my clients to point their A record to my web service so they could have their domain on my server. Similar to shopify or github pages.
However, I don't want to give them the IP of the web service, I'd like the request to go though the load balancer. How can I achieve this? Should I create a small server to forward requests? How does that work?
Many thanks!
If you are running your service behind an Elastic Load Balancer, you usually do not want to use ELB DNS name (which is something like your-service-ELB-1122334455.us-east-1.elb.amazonaws.com). Instead you will configure (probably using Route53, but any DNS service will do) CNAME or ALIAS record with some friendly name, like yourservice.yourdomain.example (this way, name will be easier to remember, and you have the freedom to change load balancer if needed).
All your customers have to do is to create CNAME DNS record pointing their name to your friendly service DNS name, like:
foo-service.theirdomain.example CNAME yourservice.yourdomain.example.
You also need to be aware that HTTP requests will have Host: header containing name entered by user (in case your server/service relies on that info)
You need to consider using Route53 as your clients's DNS service provider might not be supporting this feature beacuse of DNS rule.
See s3.6.2 of RFC 1034
Amazon created a new aliasing system for Route 53. You can now map the apex of a hosted zone to an Elastic Load Balancer using an Alias record. When Route 53 encounters an Alias record, it looks up the A records associated with the target DNS name in the Alias, and returns the IP addresses from that name.
In order to allow all of our customers to benefit from this new feature, there is no charge for queries to alias records when the target is an Elastic Load Balancer.
Associating Your Custom Domain Name with Your Load Balancer Name.
You can also create a Subdomain That Uses Amazon Route 53 as the DNS Service without Migrating the Parent Domain.

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.

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.