An application hosted on Amazon EC2 instances in a private subnet (Subnet A: ) of a VPC must securely access AWS Key Management Service (AWS KMS) to decrypt sensitive transactional payloads. Compliance policies dictate that all traffic must remain within the AWS network, and no NAT Gateways or Internet Gateways are allowed. A solutions architect deploys an Interface VPC Endpoint for AWS KMS in a separate private subnet (Subnet B: ). Both subnets are associated with custom Network Access Control Lists (NACL A and NACL B) that currently deny all traffic. To achieve this secure communication while adhering to the principle of least privilege, which combination of Security Group and Network ACL rules is required?
- AEC2 Security Group allows outbound TCP and inbound TCP -. KMS Endpoint Security Group allows inbound TCP and outbound TCP -. NACL A allows outbound TCP to . NACL B allows inbound TCP from .
- BEC2 Security Group allows outbound TCP to the KMS Endpoint Security Group. KMS Endpoint Security Group allows inbound TCP from the EC2 Security Group. NACL A allows outbound TCP - to and inbound TCP from . NACL B allows inbound TCP - from and outbound TCP to .
- EC2 Security Group allows outbound TCP to the KMS Endpoint Security Group. KMS Endpoint Security Group allows inbound TCP from the EC2 Security Group. NACL A allows outbound TCP to and inbound TCP - from . NACL B allows inbound TCP from and outbound TCP - to .Answer
- DEC2 Security Group allows outbound TCP . KMS Endpoint Security Group allows inbound TCP . NACL A allows outbound TCP to . NACL B allows inbound TCP from . Associate an AWS WAF web ACL with the KMS Interface VPC Endpoint to inspect and allow only KMS decrypt operations.
Answer
Configure the EC2 Security Group to allow outbound TCP to the KMS Endpoint Security Group, and the KMS Endpoint Security Group to allow inbound TCP from the EC2 Security Group. Configure NACL A to allow outbound TCP to and inbound TCP - from . Configure NACL B to allow inbound TCP from and outbound TCP - to .
The correct option correctly accounts for the stateful nature of Security Groups and the stateless nature of Network ACLs. Security Groups only require rules allowing the flow in the direction of connection establishment (outbound TCP on the client side, inbound TCP on the server side). Network ACLs require explicit rules for both the initial outbound request (to destination port ) and the corresponding inbound return packet (to destination ephemeral ports -) on the client subnet, and vice versa on the server subnet.
Step-by-Step Solution
Key Concept
Stateless Network ACLs vs Stateful Security Groups
Estimated Time:3m 0s