Security groups control the access to an instance by enabling you to make rules specifying the protocols, ports and source IP ranges permitted to reach the instance. Multiple security groups can be created with different rules, and assigned to each instance. For more information on security groups, see the AWS article Amazon EC2 Security Groups.
- From the EC2 dashboard, select Security Groups under NETWORK & SECURITY.
- Click Create Security Group.
- In the Create Security Group window, do the following:
- Enter a name to identify the security group.
- Specify the description for the security group.
- Select a VPC ID from the list and click Yes, Create.
- The created group appears in the security group table.
- Select the security group from the table, and specify the inbound and outbound traffic to be allowed for the instance.