A company runs a critical application on Amazon EC2 instances in a private subnet within a VPC. The subnet has no route to the internet. The application must access AWS Key Management Service (AWS KMS) to decrypt sensitive configuration files. To comply with security policies, the traffic must not traverse the public internet, and access must be restricted using the principle of least privilege. The solutions architect deploys an interface VPC endpoint for AWS KMS. Which combination of security group configurations will meet these requirements?
- AConfigure a Gateway VPC Endpoint for AWS KMS. Update the route table of the private subnet to route all KMS traffic through the gateway endpoint, and configure the security group of the EC2 instances to allow inbound traffic from the gateway endpoint.
- Configure the security group attached to the EC2 instances to allow outbound HTTPS (port 443) traffic to the security group of the interface VPC endpoint. Configure the security group attached to the interface VPC endpoint to allow inbound HTTPS traffic from the security group of the EC2 instances.Cevap
- CConfigure the security group attached to the EC2 instances to allow outbound HTTPS (port 443) traffic to the VPC endpoint. Configure the Network ACL of the private subnet to allow inbound traffic on TCP port 443 and outbound traffic on ephemeral ports (1024-65535).
- DConfigure the security group attached to the interface VPC endpoint to allow outbound HTTPS (port 443) traffic to the EC2 instances' subnet. Configure the security group of the EC2 instances to allow inbound HTTPS traffic from the public IP address range of AWS KMS.
Cevap
Configure the security group attached to the EC2 instances to allow outbound HTTPS (port 443) traffic to the security group of the interface VPC endpoint, and configure the security group attached to the interface VPC endpoint to allow inbound HTTPS traffic from the security group of the EC2 instances.
The correct answer configuration relies on stateful security groups to establish a private connection. An Interface VPC Endpoint uses an Elastic Network Interface (ENI) within the VPC. To permit the EC2 instances to communicate with the endpoint, the instances' security group must allow outbound HTTPS (port 443) traffic targeting the endpoint's security group. Conversely, the endpoint's security group must allow inbound HTTPS traffic from the EC2 instances' security group.
Adım Adım Çözüm
Anahtar Kavram
Interface VPC Endpoints (AWS PrivateLink) require security groups on the endpoint's network interfaces to control inbound traffic. Security groups are stateful, so configuring outbound rules on the client and inbound rules on the server/endpoint is sufficient.
Tahmini Süre:1m 30s