0
votes

I have created ElasticBeanstalk web server (EC2, Java8 Tomcat with SpringBoot) using AWS-CodeStar.

By default, Beanstalk environment was created as a single instance (not load balanced), and from the beginning of environment creation there there was a working link shown in the Beanstalk console:

In the form of: receptionapp.<>.us-west-1.elasticbeanstalk.com

enter image description here

This link is accessible publically and successfully returns hello world response from the server when called from the Chrome browser:

{"Output":"Hello World!"}

Now Beanstalk documentation states:

By default, your environment is available to users at a subdomain of elasticbeanstalk.com. When you create an environment, you can choose a hostname for your application. The subdomain and domain are autopopulated to region.elasticbeanstalk.com. To route users to your environment, Elastic Beanstalk registers a CNAME record that points to your environment's load balancer. You can see URL of your environment's application with the current value of the CNAME in the environment overview page of the Elastic Beanstalk console. -- https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html

"Elastic Beanstalk registers a CNAME record that points to your environment's load balancer" -- There was no load balancer at first and the link worked presuming I remember correctly. I have since added a load balancer by switching the Beanstalk configuration to be load balanced.

Minor question: What in the world did the link point to? Directly to the EC2 instance?

And Major question: Where do I find what this link is actually doing? I have looked around Route53, and around EC2 LoadBalancers, also looked in command line eb config and there doesn't seem to be any mentions of this domain name receptionapp.<>.us-west-1.elasticbeanstalk.com link, or where it points to. (Right now I don't even know whether it points to LoadBalancer that was added by Beanstalk as configuration change)

1

1 Answers

1
votes

What in the world did the link point to? Directly to the EC2 instance?

To the Elastic IP address of your EB instance. If you don't have load balancer, EB uses EIP to provide static public IP address for your single-instance EB environment. You can find this EIP in EC2 console under "Elastic IPs" menu option on the left.

You can use drill or dig commands on Linux to check where your EB domanin points to. From example, from drill:

;; ANSWER SECTION:
xxxxxx.eba-2wppwtse.us-east-1.elasticbeanstalk.com. 60  IN  A   111.111.111.111

where 111.111.111.111 will be IP of your EIP.