Working with security groups in Amazon EC2
In Amazon EC2, a security group acts as a virtual firewall that controls the network traffic for one or more EC2 instances. By default, EC2 associates your instances with a security group that allows no inbound traffic. You can create a security group that allows your EC2 instances to accept certain traffic. For example, if you need to connect to an EC2 Windows instance, you must configure the security group to allow RDP traffic.
To read more about security groups see Amazon EC2 security groups in the Amazon EC2 User Guide.
Warning
EC2-Classic was retired on August 15, 2022. We recommend that you migrate from EC2-Classic to a
VPC. For more information, see the blog post EC2-Classic Networking is Retiring
– Here's How to Prepare
For information about the APIs and prerequisites, see the parent section (Working with Amazon EC2).