Generated by GPT-5-mini| AWS Security Groups | |
|---|---|
| Name | AWS Security Groups |
| Developer | Amazon Web Services |
| Released | 2006 |
| Genre | Cloud security |
AWS Security Groups are virtual firewalls used to control inbound and outbound traffic for Amazon Elastic Compute Cloud, Amazon Relational Database Service, Elastic Load Balancing, and other Amazon Web Services resources. They implement stateful filtering for network protocols and are managed through the AWS Management Console, AWS CLI, or AWS SDKs, integrating with identity systems such as AWS Identity and Access Management and logging services like AWS CloudTrail. Security Groups are a foundational component of Amazon VPC networking and are regularly discussed alongside services like AWS Network ACL, Amazon Inspector, and AWS Config in enterprise cloud architectures.
Security Groups operate at the instance or ENI level within an Amazon Virtual Private Cloud, providing per-resource access control for IPv4 and IPv6 traffic. They are stateful: return traffic for an allowed request is permitted automatically. Administrators define sets of rules specifying protocols, ports, and source or destination CIDR ranges or other security groups, which are enforced by the underlying hypervisor and network fabric of Amazon EC2 hosts and AWS Nitro System hardware. As part of a broader cloud security posture, Security Groups are often configured alongside Security Token Service workflows, AWS Organizations policies, and network services like AWS Transit Gateway.
Security Groups support protocol-specific rules (TCP, UDP, ICMP), port ranges, and referencing by security-group ID for fine-grained trust relationships among resources. They are implemented as soft-state constructs that can be attached to multiple ENIs and can be modified without restarting instances, reflecting ideas similar to software-defined networking in OpenStack and VMware ESXi deployments. Key concepts include default Security Groups created per VPC, rule evaluation order that is permissive-only (there are no explicit deny rules), and interaction with Network Access Control Lists which are stateless and operate at the subnet level. Integration points include logging to Amazon CloudWatch Logs, auditing with AWS CloudTrail, and compliance mapping in frameworks such as SOC 2, ISO/IEC 27001, and PCI DSS assessments.
Administrators create and manage Security Groups via the AWS Management Console, programmatically through the AWS CLI, or with infrastructure-as-code tools like AWS CloudFormation, Terraform (software), and HashiCorp Packer. Typical configuration steps include selecting a VPC, defining inbound and outbound rules, and attaching the Security Group to EC2 instances, RDS instances, or Elastic Network Interfaces. Common usage patterns are tiered network models that mirror designs from Tiered architecture practices, microservices deployments using Amazon Elastic Kubernetes Service, and hybrid connectivity with AWS Direct Connect or AWS Site-to-Site VPN. Role-based controls for who can modify Security Groups are usually enforced via AWS Identity and Access Management policies, often combined with change-control audits stored in AWS Config.
Apply the principle of least privilege by restricting inbound access to specific CIDR blocks or known security groups rather than wide-open ranges. Use Security Group references to limit trust between tiers (for example, allow Elastic Load Balancing to reach application instances but not vice versa) and rotate management credentials through AWS Secrets Manager or AWS Systems Manager Parameter Store for automation credentials. Enforce change control and detection with AWS CloudTrail and AWS Config Rules, and integrate vulnerability scanning from Amazon Inspector and threat detection from Amazon GuardDuty into incident response runbooks aligned with NIST Cybersecurity Framework standards. Employ tagging strategies consistent with AWS Resource Groups and AWS Organizations for ownership, billing, and lifecycle policies.
Security Groups do not support explicit deny rules; their model is allow-only, differing from the stateless deny/allow model of Network Access Control Lists. There are account-level quotas on the number of Security Groups per VPC and rules per Security Group that must be managed like other AWS limits (similar to quotas in Amazon S3 and AWS Lambda). For complex network security, organizations may adopt additional services such as AWS Network Firewall, third-party virtual appliances from vendors like Palo Alto Networks, or service meshes like Istio for application-layer policy, which provide capabilities beyond the Layer 3/4 scope of Security Groups. When comparing to on-premises approaches (for example, Cisco ASA or Juniper SRX), Security Groups emphasize API-driven, ephemeral infrastructure patterns prevalent in cloud-native environments.
Common troubleshooting steps include verifying Security Group rules, checking attached ENIs, confirming subnet route tables and Internet Gateway or NAT Gateway configurations, and reviewing AWS CloudTrail event history for rule changes. Use Amazon CloudWatch metrics and VPC Flow Logs (ingested into CloudWatch Logs or Amazon S3) to inspect accepted and rejected traffic patterns, and combine those with GuardDuty findings or AWS Config drift reports to detect misconfigurations. For automated remediation, organizations often deploy AWS Config rules, Lambda-backed controls, or use orchestration platforms like AWS Systems Manager to enforce Security Group hygiene.