A cloud security engineer is hardening an Amazon EC2 instance running in a private subnet. The instance needs to securely communicate with an Amazon S3 bucket without traffic traversing the public internet. Which VPC configuration must be implemented to meet this requirement?
Trap 1: An AWS Client VPN Endpoint attached to the VPC
Client VPN provides remote user access to the VPC, not private internal routing to S3.
Trap 2: An interface VPC endpoint using AWS PrivateLink
While PrivateLink can be used for S3, a Gateway Endpoint is the standard, cost-effective native mechanism for S3 and DynamoDB without ENI overhead.
Trap 3: A NAT Gateway deployed in the private subnet
A NAT Gateway routes private subnet traffic out to the public internet, which violates the security requirement.
- A
A VPC Gateway Endpoint for Amazon S3 with associated route tables
A VPC Gateway Endpoint attaches to the route table and routes S3 traffic privately over the AWS backbone, so packets never traverse the public internet or require NAT or an internet gateway. This satisfies the private-subnet confidentiality requirement; Interface Endpoints use ENIs and private IPs instead.
- B
An AWS Client VPN Endpoint attached to the VPC
Why it fails: Client VPN provides remote user access to the VPC, not private internal routing to S3.
- C
An interface VPC endpoint using AWS PrivateLink
Why it fails: While PrivateLink can be used for S3, a Gateway Endpoint is the standard, cost-effective native mechanism for S3 and DynamoDB without ENI overhead.
- D
A NAT Gateway deployed in the private subnet
Why it fails: A NAT Gateway routes private subnet traffic out to the public internet, which violates the security requirement.