Should I use Elastic Beanstalk Dns name directly from application - amazon-web-services

I am deploying a webservice (rather a website) with AWS Elastic Beanstalk, this is then used by client application, and I shall proably make the webserver servers name configurable in the application in case it has to be moved.
Should I just refer to the EB Dns name (i.e companyname#elasticbeanstalk.com) from my application or am I meant to reference it indirectly through some other name, such as a domain I could own like webservice-mycompany.com

You can use the elastic-beanstalk IP, but this could change if you wanted to launch a new environment for some reason. But if you can change your app and update this, then this dns is fine.
Or you could us route 53 to create a DNS to provide to your app, and you can set it up to resolve to your elasticbeanstalk dns. This way you would never have to change your application and can control everything from the console.
http://aws.amazon.com/route53/

Related

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.

How can I use my CPanel/WHM panel to manage my R53 domains

I'm new and I recentely installed Cpanel/WHM into a AWS EC2, everything works fine, but I have a question about it.
It is possible to register an A type registry on R53 pointing to my own DNS server (CPanel/WHM).
For example:
My server is server.com, and there I have a DNS server that works fine and where I have multiple domains registered on it.
If I register ns1.server.com into R53 like A registry and it points to my server. Would it works globally?
You would not really need to register your nameservers with R53 if you just want your server to act as authority on that domain. You would need to go to your domain registrar and point the name server entries there to your DNS server that is running on the EC2 instance.
But you would also need a DNS entry for that name server somewhere. If you are running your app on AWS unless you need your own NS for some kind of custom setup I would just use R53. Works great and is much cheaper than using a server specifically for that purpose.

Route 53 DNS: Different DNS for base URL and endpoints (test.co and test.co/api)

Hopefully you all can help - we're looking to migrate our website from an EC2 instance to Webflow hosting. Unfortunately, we'd like to keep our API on the EC2 instance. Is it possible (in DNS in general, and specifically with route53) to have one DNS record for test.co and it's URL's (text.co/zxc, test.co/abc) and one DNS record specifically for the API URLs (test.co/api/abc)?
This would make the process much, much easier, as we wouldn't have to migrate the files to our EC2 instance and could keep the benefits of hosting on Webflow. However, performance is a key concern here for the API layer - my gut tells me that redirects are slow, and would add time to every API call. Not ideal.
Let me know what you think - cheers!
Using Route53 (or any DNS host) you can only resolve the hostname part (not the path) of the URL to your EC2 instance (E.g test.co, text.co) using either using.
CName mapping to the Domain Name assigned to the EC2 instance
A Record to the IP of the EC2 instance
Note: It is recommended to setup an Elastic IP for the EC2 instance if you directly map the EC2 instance to Route53.
You need to map /zxc /abc and /api/abc paths to relevant routes inside your EC2 instance either at WebServer level or using a proxy (E.g Nginx, Apache).
Is it possible (in DNS in general, and specifically with route53) to
have one DNS record for test.co and it's URL's (text.co/zxc,
test.co/abc) and one DNS record specifically for the API URLs
(test.co/api/abc)?
The best solution is to create a subdomain. api.test.com, then create an "A" record that point your api.test.com to your EC2 instance.
NJOY

What should I set for origin domain name when using Cloudfront, EB and Route 53?

I'm trying to set up CloudFront but getting stuck on the first field origin domain name
Currently Im using Elastic Beanstalk to deploy my webservice as an Application, and the EB url is mapped to a Route 53 domain, the customer accesses the webservice via the Route 53 domain.
With EB one Application can have multiple environments, and each environment has a load-balancer. I usually have just one environment but when I want to deploy a new version of the application I create a new environment. Then once that is ready I use Swap URLs so that the new environment is the one pointed to my the Route53 domain, and then I delete the old environment. This approach ensures no down-time.
Now with CloudFront the list of values it provides are my S3 containers (not what I want) and the Load-Balancer for any currently running environments. Bu this is not what I want either because if I point it at a load-balancer when I have a new version the environment that load-balancer works for will be terminated
Is it not possible to set it to the Application/Route 53 Domain name so I can deploy new version of my application without breaking anything on CloudFront.
Turns out that although it is not listed I can indeed just set it the CNAME Ive set in Route53, and it works

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.