A logistics company is deploying a fleet of Amazon EC2 instances in private subnets within a VPC. These instances must upload high volumes of archived tracking logs directly to Amazon S3, and communicate with an external shipping carrier's API over HTTPS to update package statuses. The solution must ensure secure connectivity, prevent direct inbound connections from the internet to the EC2 instances, and minimize data transfer costs. Which combination of configurations should a solutions architect implement to meet these requirements? (Select TWO.)
- Create a Gateway VPC endpoint for Amazon S3 and associate it with the route tables of the private subnets.Answer
- Deploy a NAT gateway in a public subnet, and configure the route tables of the private subnets to route outbound traffic destined for the internet to the NAT gateway.Answer
- CConfigure a network ACL on the private subnets with a stateful rule that permits inbound traffic on ephemeral ports and outbound HTTPS traffic to the carrier's API.
- DRoute all S3-bound traffic from the private subnets through a NAT gateway deployed in a public subnet to avoid establishing VPC endpoints.
- EModify the security group of the EC2 instances in the private subnets to allow inbound traffic on HTTPS port 443 from the external shipping carrier's API endpoints.
Answer
Create a Gateway VPC endpoint for Amazon S3 and associate it with the route tables of the private subnets, and deploy a NAT gateway in a public subnet, and configure the route tables of the private subnets to route outbound traffic destined for the internet to the NAT gateway.
The solution requires secure, cost-effective egress. Deploying a Gateway VPC endpoint for Amazon S3 establishes a secure, private connection to S3 that avoids the internet and NAT Gateway charges. A NAT gateway in a public subnet enables private EC2 instances to securely establish outbound-only communication with the external shipping carrier's API over the internet.
Step-by-Step Solution
Key Concept
VPC Network Security and Cost Optimization