Question

Difficulty: MediumManaging Storage and Data Transfer Costs

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 40 TB40\text{ TB} of data per month. The instances also stream application logs to Amazon CloudWatch Logs, transferring approximately 15 TB15\text{ TB} 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?

  1. 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
  2. B
    Create 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.
  3. C
    Consolidate 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.
  4. D
    Deploy 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 1,800monthlydataprocessingfee.CloudWatchLogsonlysupportsInterfaceVPCEndpoints,whichcharge1,800 monthly data processing fee. CloudWatch Logs only supports Interface VPC Endpoints, which charge 0.01 per GB for processing and 0.01perhourperAZ.Thistotals0.01 per hour per AZ. This totals 171.90 per month, which represents a net savings of over 500comparedtoroutingCloudWatchLogstrafficthroughNATGateways(500 compared to routing CloudWatch Logs traffic through NAT Gateways ( 675 per month).

Step-by-Step Solution

1
Calculate the baseline data processing cost using NAT Gateways.
S3 traffic costs 40,000 GB×$0.045/GB=$1,800/month40,000\text{ GB} \times \$0.045/\text{GB} = \$1,800/\text{month}. CloudWatch Logs traffic costs 15,000 GB×$0.045/GB=$675/month15,000\text{ GB} \times \$0.045/\text{GB} = \$675/\text{month}. Total baseline processing cost is \2,475/month2,475/\text{month}.
This establishes the current monthly costs that need to be optimized.
2
Evaluate the cost of using a Gateway VPC Endpoint for S3.
Gateway VPC Endpoints have no hourly or data processing charges. Cost is \0/month0/\text{month}, saving \1,800/month1,800/\text{month} for S3 traffic.
S3 supports Gateway endpoints, which are the most cost-effective way to route traffic within the same region.
3
Evaluate the cost of using an Interface VPC Endpoint for CloudWatch Logs across 3 Availability Zones.
Hourly charges: 3 AZs×730 hours/month×$0.01/hour=$21.90/month3\text{ AZs} \times 730\text{ hours/month} \times \$0.01/\text{hour} = \$21.90/\text{month}. Data processing: 15,000 GB×$0.01/GB=$150/month15,000\text{ GB} \times \$0.01/\text{GB} = \$150/\text{month}. Total cost: \171.90/month171.90/\text{month}, saving \503.10/month503.10/\text{month} compared to NAT Gateway routing.
CloudWatch Logs does not support Gateway endpoints, so Interface endpoints must be evaluated to see if they yield savings over NAT Gateways.

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
Rate this question