aws security ec2 Ec2 security group purpose aws What is the purpose of an EC2 Security Group? An EC2 Security Group acts as a virtual firewall for your Amazon EC2 instances, controlling inbound and outbound traffic based on specified rules. It helps secure your instances by allowing only authorized access.