A company's application runs on Amazon EC2 instances in private subnets across three Availability Zones in a VPC. The instances regularly download configuration files from an Amazon S3 bucket in the same region, transferring approximately of data per month. The instances also stream application logs to Amazon CloudWatch Logs, transferring approximately of data per month. Currently, all outbound traffic from the private subnets is routed through NAT Gateways deployed in each Availability Zone. A solutions architect needs to implement a solution to reduce the data transfer costs without compromising security or availability.
Which of the following configurations is the most cost-effective?
- Create a Gateway VPC endpoint for Amazon S3 and associate it with the route tables of the private subnets. Create an Interface VPC endpoint for Amazon CloudWatch Logs in each of the three Availability Zones, and configure the instances to route CloudWatch traffic through this endpoint.Answer
- BCreate Interface VPC endpoints for both Amazon S3 and Amazon CloudWatch Logs in each of the three Availability Zones, and configure the instances to route all S3 and CloudWatch traffic through these endpoints.
- CConsolidate the three NAT Gateways into a single NAT Gateway in one Availability Zone, and keep the existing routing configuration for both Amazon S3 and Amazon CloudWatch Logs.
- DDeploy an AWS Transit Gateway, configure a VPN connection from the private subnets to the Transit Gateway, and route all S3 and CloudWatch Logs traffic through the Transit Gateway to their respective public endpoints.
Answer
Create a Gateway VPC endpoint for Amazon S3 and associate it with the route tables of the private subnets. Create an Interface VPC endpoint for Amazon CloudWatch Logs in each of the three Availability Zones, and configure the instances to route CloudWatch traffic through this endpoint.
The correct configuration uses a Gateway VPC Endpoint for S3 and an Interface VPC Endpoint for CloudWatch Logs. Gateway VPC Endpoints for S3 are free of charge, completely eliminating the 0.01 per GB for processing and 171.90 per month, which represents a net savings of over 675 per month).
Step-by-Step Solution
Key Concept
VPC endpoints optimize both costs and security by routing traffic internally within the AWS network, bypassing NAT Gateways and their high data processing charges.
Estimated Time:2m 0s