Question

Difficulty: MediumOptimizing Resource Costs and Sizing

A company runs a high-volume containerized application on AWS Fargate in a dedicated VPC within a member account of an AWS Organization. The application also uses AWS Lambda for background processing and Amazon Aurora PostgreSQL Serverless v2 for the database. Analysis of the organization's monthly bill reveals that AWS Fargate, AWS Lambda, and NAT Gateway data processing charges represent the highest cost factors. The NAT Gateway data processing costs are elevated because Fargate tasks in private subnets regularly download large container images from Amazon ECR and make frequent API requests to Amazon S3 and Amazon DynamoDB. The company has consolidated billing enabled across all accounts in the AWS Organization. Which two actions should a Solutions Architect recommend to optimize resource costs while maintaining high availability and requiring minimal operational effort? (Select TWO.)

  1. Purchase Compute Savings Plans at the AWS Organizations management account level to cover the Fargate and Lambda compute usage across all member accounts.Answer
  2. Create Gateway VPC endpoints for Amazon S3 and Amazon DynamoDB, and Interface VPC endpoints for Amazon ECR in the application VPC.Answer
  3. C
    Purchase EC2 Instance Savings Plans at the member account level to reduce the compute costs of both the Fargate tasks and Lambda functions.
  4. D
    Reconfigure the VPC route tables in the private subnets to route all outbound traffic through a single NAT Gateway in one Availability Zone.
  5. E
    Use AWS Resource Access Manager (RAM) to share a single NAT Gateway from a central network account to the application VPC.

Answer

Purchase Compute Savings Plans at the AWS Organizations management account level, and create Gateway VPC endpoints for Amazon S3 and Amazon DynamoDB, and Interface VPC endpoints for Amazon ECR in the application VPC.
Purchasing Compute Savings Plans at the AWS Organizations management account level provides the maximum flexibility and automatically applies discounts to eligible compute usage, including AWS Fargate and AWS Lambda, across all member accounts. Establishing Gateway VPC endpoints for Amazon S3 and Amazon DynamoDB, alongside Interface VPC endpoints for Amazon ECR, directs traffic to these services through private AWS routing, completely bypassing the NAT Gateway and eliminating associated NAT Gateway data processing charges.

Step-by-Step Solution

1
Evaluate the compute options to optimize Fargate and Lambda workloads.
Select Compute Savings Plans rather than EC2 Instance Savings Plans because Compute Savings Plans apply automatically to Fargate and Lambda compute hours.
EC2 Instance Savings Plans are limited to EC2 instances and do not apply to Fargate or Lambda.
2
Determine the purchasing account scope for the savings plans.
Purchase Compute Savings Plans at the management account level of the AWS Organization.
This allows unused savings plan capacity to be shared across all member accounts under consolidated billing, maximizing utilization and savings.
3
Identify the high-bandwidth traffic routing paths through the NAT Gateway.
Configure Gateway VPC endpoints for S3 and DynamoDB, and Interface VPC endpoints for ECR in the VPC hosting Fargate tasks.
Traffic to these services bypasses the NAT Gateway and routes directly within the AWS network, which eliminates NAT Gateway data processing charges while keeping redundancy.

Key Concept

Compute cost optimization requires aligning the appropriate Savings Plan type (Compute vs EC2 Instance) with the compute services (Fargate/Lambda). Network cost optimization involves using VPC endpoints to route high-volume traffic to AWS services privately, bypassing NAT Gateways.
Rate this question