Question

Difficulty: MediumOptimizing Resource Costs and Sizing

An enterprise manages a multi-account environment under AWS Organizations with consolidated billing enabled. The Production account runs a microservices application on Amazon Elastic Container Service (ECS) using AWS Fargate across three Availability Zones. Each Fargate task is configured with 2 vCPU2\text{ vCPU} and 8 GB8\text{ GB} of memory. However, Amazon CloudWatch metrics show that the tasks average 15%15\% CPU utilization and experience a peak memory utilization of 35%35\% (2.8 GB2.8\text{ GB}). In the Development account, testing environments run on various transient Amazon EC2 instances that change instance families frequently based on testing needs. The company wants to optimize compute costs across both accounts while maintaining high availability in the Production environment.

Which strategy should a solutions architect recommend to achieve these goals?

  1. A
    Downsize the Fargate tasks in the Production account to 0.5 vCPU0.5\text{ vCPU} and 4 GB4\text{ GB} of memory. Keep a NAT Gateway deployed in each of the three Availability Zones. Purchase EC2 Instance Savings Plans at the Organization's management account level.
  2. B
    Downsize the Fargate tasks in the Production account to 0.5 vCPU0.5\text{ vCPU} and 4 GB4\text{ GB} of memory. Consolidate the NAT Gateways in the Production account to a single NAT Gateway in one Availability Zone to save on hourly gateway charges. Purchase Compute Savings Plans at the Organization's management account level.
  3. Downsize the Fargate tasks in the Production account to 0.5 vCPU0.5\text{ vCPU} and 4 GB4\text{ GB} of memory. Keep a NAT Gateway deployed in each of the three Availability Zones. Purchase Compute Savings Plans at the Organization's management account level.Answer
  4. D
    Keep the Fargate tasks at their current sizes. Share the EC2 capacity from the Development account with the Production account using AWS Resource Access Manager (RAM) to consolidate compute allocations before purchasing EC2 Instance Savings Plans.

Answer

Downsize the Fargate tasks in the Production account to 0.5 vCPU0.5\text{ vCPU} and 4 GB4\text{ GB} of memory. Keep a NAT Gateway deployed in each of the three Availability Zones. Purchase Compute Savings Plans at the Organization's management account level.
The correct strategy involves downsizing the over-provisioned Fargate tasks and purchasing Compute Savings Plans. Downsizing the tasks to 0.5 vCPU0.5\text{ vCPU} and 4 GB4\text{ GB} of memory accommodates the peak memory utilization of 2.8 GB2.8\text{ GB} and average CPU of 0.3 vCPU0.3\text{ vCPU} while significantly reducing costs. Purchasing Compute Savings Plans at the Organization's management account level ensures that the savings apply automatically across all member accounts to both Fargate and the transient EC2 instances. Keeping redundant NAT Gateways ensures that high availability is maintained for the Production environment.

Step-by-Step Solution

1
Analyze Fargate utilization metrics to determine the right-sizing opportunity.
Peak memory utilization is 35%35\% of 8 GB8\text{ GB}, which equals 2.8 GB2.8\text{ GB}, and average CPU is 15%15\% of 2 vCPU2\text{ vCPU}, which equals 0.3 vCPU0.3\text{ vCPU}. Downsizing to a supported configuration of 0.5 vCPU0.5\text{ vCPU} and 4 GB4\text{ GB} of memory safely covers these requirements.
Right-sizing eliminates unnecessary capacity and minimizes the base on-demand cost before applying commitment discounts.
2
Select the correct Savings Plan type for the mixed compute workload (ECS Fargate and transient EC2 instances).
Compute Savings Plans are selected because they apply to both Fargate and EC2, regardless of instance family, size, or region.
EC2 Instance Savings Plans do not cover Fargate and lack the flexibility needed for the transient EC2 instances in the Development account.
3
Review network gateway configurations in the Production VPC to maintain high availability.
Retain a NAT Gateway in each of the three Availability Zones to prevent a single point of failure.
Consolidating NAT Gateways would compromise the high availability requirement in the Production environment.

Key Concept

Optimizing resource costs involves first right-sizing resources based on CloudWatch metrics and then applying flexible commitment discounts, such as Compute Savings Plans, to cover dynamic or mixed compute workloads across an AWS Organization without compromising high availability.
Rate this question