What is the public URL of my EC2 instance?

Some sources suggest that it https://ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com/ (where xxx-xxx-xxx-xxx is the public IP address of the machine). But when I navigate there, Chrome says This site can't be reached .

+5
source share
3 answers

Just use the host command and specify your public IP address - it will show you the correct URL, for example

 $ host 52.204.122.132 132.122.204.52.in-addr.arpa domain name pointer ec2-52-204-122-132.compute-1.amazonaws.com. 
+6
source

When you access the URL from any browser, you need to make sure that port 80 is the port, which is the default port. If you just launched an instance of Linux ec2, it is only available through ssh. To access these instances, you need an access certificate created at startup, and an ssh client such as ssh for Linux or putty for Windows. In addition, if you have a service running on port 80 or any other, you must ensure that these ports are open in the security policy of your instance.

+3
source

The public DNS address and IP address can be used directly in the browser. You just need to open ports 80 (http) and 443 (https, not necessarily, more ...).

You must upload the file to / var / www / html to host your site.

0
source

Source: https://habr.com/ru/post/1245436/


All Articles