AWS security groups

App not showing on the browser
Written by DEL support01
Updated 7 months ago

Let s say you re working on a project, it can be directly on your host (java, python, apache etc)or in a docker container. 
you followed all the step correctly , but your application is not visible on the browser

for docker you know your container is running you have the right port 80

and also on your browser

this can happen if the ports are not open(enabled) on your security groups on aws. 

To verify that , open your instance details on aws and then click on the security tab

the name of the security group attached to the instance is displayed here, you click on it 

it will open the SG(security group) details as shown below, then click on inbound rules

The inbound rules by default usually have the ssh(22) and tcp (80) ports open, but regardless, Add a rule, choose All TCP in the first block, Anywhere IPv4 on the 2nd, then Save rules

this will open all the ports (0-65535) on your aws instance, and you ll be able to watch the application(remember, these are only for practice; for actual deployment(production) you never open all ports, just the ones needed.

for docker:

when launching a new instance, it s best practice to attach an already existing security group(that you configured) to avoid creating one each time

choose the 2nd option and select the SG you configured earlier (all ports open in my case) 

You can find all your security groups on the EC2 dashboard and edit the ones you want to your liking

AND REMEMBER GUYS, ALWAYS STOP YOUR INSTANCE WHEN YOU RE DONE WORKING, to save on cost

Did this answer your question?