As a best practice, secure your resources with multiple layers of defense. A client application can use a secure network protocol such as TLS and HTTPS to encrypt data payload in transit, ensuring third party actors can’t read or impersonate the traffic.
In a VPC, you can add both security groups and network ACLs to further protect your EC2 instances in a subnet. When you implement both as a defense-in-depth approach, a mistake in the configuration of one control won’t expose the instance to unwanted traffic.
Both security groups and network ACLs define network traffic filters called rules. They can be used simultaneously or individually to protect VPC resources.
You can define relationships between security groups, such as instances in a database tier security group only accepting traffic from application tier security groups.
When organizations deal with sensitive data or have strict compliance requirements, AWS Network Firewall provides an additional security layer beyond security groups and network ACLs.
Multiple Defense Layers: Implement security groups, network ACLs, and AWS Network Firewall for comprehensive protection
Stateful vs Stateless: Security groups automatically handle return traffic, while network ACLs require explicit rules for both directions
Traffic Inspection: Route external VPC traffic through AWS Network Firewall for additional security layer
Administrative Access: Use bastion hosts to securely administrate private subnet resources from on-premises environments
Securing AWS infrastructure requires multiple layers of defense combining stateful security groups for resource-level protection and stateless network ACLs for subnet-level control, with optional AWS Network Firewall for advanced threat protection and bastion hosts for secure administrative access.