Help us improve the AWS re:Post Knowledge Center by sharing your feedback in a brief survey. Your input can influence how we create and update our content to better support your AWS journey.
How do I allow access to an application on an EC2 instance with a security group?
2 minute read
0
I want to allow access to an application on my Amazon Elastic Compute Cloud (Amazon EC2) instance using security groups.
Resolution
New security groups have only an outbound rule to allow traffic by default. Security groups associated with an Amazon EC2 instance control inbound and outbound traffic for the instance. You must add rules to security groups to allow inbound traffic or restrict outbound traffic with your Amazon Virtual Private Cloud (Amazon VPC).
For example, applications hosted on port 80 or 443 on the Amazon EC2 instance must allow users to connect with an inbound rule. For HTTP traffic, add an inbound rule on port 80 from the source address 0.0.0.0/0. For HTTPS traffic, add an inbound rule on port 443 from the source address 0.0.0.0/0. For more information, see Example inbound and outbound rules.