Security groups
Security groups works like a firewall and manages inbound and outbound traffic based on configured rules at the instance level.
We can assign different security groups to different instances based on the need. There is a default security group available. It is a default VPC security group that is available in EC2 dashboard and VPC dashboard as well. Let's Create Security Group
.
- Provide
Security group name
and select VPC. Click onCreate
- Add
Inbound
orOutbound
rule based on the requirements and click onCreate
Verify security group in dashboard.
Note
Security group is applicable at an instance level. Up to five security groups can be assigned to an instance. You can create 500 security groups per VPC (per region), 50 inbound or outbound rules per security group, and 5 security groups per network interface.