A company is deploying a secure database client application on Amazon EC2 instances in a private application subnet (CIDR ) of a VPC. The application must securely query an AWS service using an Interface VPC Endpoint. To enhance security boundaries, the Interface VPC Endpoint is deployed in a separate dedicated endpoint subnet (CIDR ). Both subnets are associated with custom Network Access Control Lists (NACLs) that deny all inbound and outbound traffic by default. The EC2 instances must initiate HTTPS connections on port to the Interface VPC Endpoint. Which configuration steps must be implemented to allow this communication while maintaining the principle of least privilege? (Select TWO.)
- In the Network ACL associated with the private application subnet, add an outbound rule that allows outbound TCP traffic on port to the destination CIDR , and an inbound rule that allows inbound TCP traffic on ports from the source CIDR .Answer
- In the Network ACL associated with the VPC endpoint subnet, add an inbound rule that allows inbound TCP traffic on port from the source CIDR , and an outbound rule that allows outbound TCP traffic on ports to the destination CIDR .Answer
- CIn the Network ACL associated with the private application subnet, add an outbound rule that allows outbound TCP traffic on port to the destination CIDR . No corresponding inbound rule is required because Network ACLs automatically allow return traffic.
- DIn the security group attached to the EC2 instances, add an outbound rule allowing TCP traffic on port to the Interface VPC Endpoint's security group, and an inbound rule allowing TCP traffic on ports from the Interface VPC Endpoint's security group.
- EIn the security group attached to the Interface VPC Endpoint, add an inbound rule allowing TCP traffic on port from the EC2 instances' security group. No security group rules are required on the EC2 instances because security groups are applied at the subnet boundary.
Answer
To establish communication under a default-deny Network ACL architecture, the Network ACL for the application subnet must allow outbound traffic on port and inbound traffic on ephemeral ports . Concurrently, the Network ACL for the endpoint subnet must allow inbound traffic on port and outbound traffic on ephemeral ports .
Because Network ACLs are stateless, they evaluate traffic in each direction independently. Since the EC2 client initiates an HTTPS request to the Interface VPC Endpoint across subnet boundaries, the application subnet's Network ACL must permit outbound TCP traffic on port and inbound return traffic on the ephemeral port range (). Reciprocally, the endpoint subnet's Network ACL must permit inbound TCP traffic on port and outbound return traffic on the ephemeral port range () back to the application subnet.
Step-by-Step Solution
Key Concept
The stateless nature of Network ACLs requiring explicit configuration for both request and response traffic paths, compared to the stateful nature of Security Groups.
Estimated Time:2m 30s