An enterprise hosts a batch processing application on Amazon EC2 instances in a private VPC subnet. The application must securely upload large datasets to a specific Amazon S3 bucket within the same AWS Region. Security policy requires that all traffic to Amazon S3 must remain within the AWS network, and no other outbound internet access should be permitted from the EC2 instances. The architecture must minimize data transfer costs and administrative overhead. Which combination of actions should a solutions architect perform to meet these requirements? (Select TWO.)
- Create a Gateway VPC Endpoint for Amazon S3, associate it with the private subnet's route table, and apply an endpoint policy that restricts access to the organization's specific S3 bucket.Answer
- Configure the security group attached to the EC2 instances to allow outbound HTTPS traffic to the AWS-managed prefix list for Amazon S3, and remove the default rule allowing all outbound traffic (0.0.0.0/0).Answer
- CConfigure the private subnet's Network ACL to allow outbound traffic only to the Amazon S3 Gateway Endpoint ID, and deny all other outbound traffic.
- DDeploy a NAT Gateway in the private subnet and create a route in the route table for Amazon S3 traffic pointing to the NAT Gateway with an attached AWS WAF web ACL to filter bucket access.
- ECreate an Interface VPC Endpoint for Amazon S3, manually add a route to the subnet's route table targeting the endpoint interface's Elastic Network Interface (ENI) for all destinations, and restrict access using a Security Group outbound rule targeting the S3 DNS name.
Answer
Create a Gateway VPC Endpoint for Amazon S3, associate it with the private subnet's route table, and apply an endpoint policy that restricts access to the organization's specific S3 bucket. Additionally, configure the security group attached to the EC2 instances to allow outbound HTTPS traffic to the AWS-managed prefix list for Amazon S3, and remove the default rule allowing all outbound traffic.
The correct strategy combines the creation of a Gateway VPC Endpoint for Amazon S3 with security group outbound rules. The Gateway Endpoint provides secure, private access to Amazon S3 at no additional cost and automatically handles routing updates. The endpoint policy secures S3 access by ensuring instances can only interact with the specified bucket. By configuring the EC2 security group to permit outbound HTTPS traffic only to the AWS-managed prefix list for S3 and removing the default open outbound rule, the instances are prevented from reaching any other public internet destinations.
Step-by-Step Solution
Key Concept
Combining S3 Gateway Endpoints with Security Group prefix list filtering allows secure, cost-effective, private resource access while preventing all other egress to the internet.