Soru

Zorluk: OrtaOptimizing Resource Costs and Sizing

A financial services company runs a transaction processing workload in a dedicated member account of an AWS Organization. The architecture consists of the following components:

- An Amazon ECS cluster running tasks on AWS Fargate across two Availability Zones (AZs) for stateless APIs.
- A fleet of Amazon EC2 instances (c6i.2xlargec6i.2xlarge instances: 8 vCPU8\text{ vCPU}, 16 GiB16\text{ GiB} memory) in an Auto Scaling group across two AZs for message processing.
- Outbound traffic to external payment gateways routed through redundant NAT Gateways (one per AZ).

Performance monitoring over the past 30 days30\text{ days} reveals the following utilization metrics:

Resource TypeCurrent SpecificationAverage CPU UtilizationPeak Memory Utilization
ECS Fargate TasksDynamic10%10\%15%15\%
EC2 Instancesc6i.2xlargec6i.2xlarge (8 vCPU8\text{ vCPU}, 16 GiB16\text{ GiB} memory)40%40\%13.5 GiB13.5\text{ GiB}

The company wants to optimize resource costs while maintaining high availability, ensuring zero application downtime during configuration changes, and securing a 3-year3\text{-year} discount commitment. Which of the following strategies should a Solutions Architect recommend to optimize resource costs while meeting all performance, high availability, and operational requirements?

  1. Downsize the Fargate task CPU and memory configurations. Migrate the EC2 instances to m6i.xlargem6i.xlarge (4 vCPU4\text{ vCPU}, 16 GiB16\text{ GiB} memory) using a rolling update in the Auto Scaling group. Purchase a 3-year Compute Savings Plan in the management account of the AWS Organization.Cevap
  2. B
    Downsize the Fargate task CPU and memory configurations. Migrate the EC2 instances to c6i.xlargec6i.xlarge (4 vCPU4\text{ vCPU}, 8 GiB8\text{ GiB} memory) using a rolling update in the Auto Scaling group. Purchase a 3-year EC2 Instance Savings Plan for the c6ic6i family in the member account.
  3. C
    Downsize the Fargate task CPU and memory configurations. Migrate the EC2 instances to m6i.xlargem6i.xlarge (4 vCPU4\text{ vCPU}, 16 GiB16\text{ GiB} memory). Replace the redundant NAT Gateways with a single NAT Gateway in one Availability Zone to eliminate hourly NAT charges. Purchase a 3-year EC2 Instance Savings Plan for the m6im6i family in the management account.
  4. D
    Downsize the Fargate task CPU and memory configurations. Migrate the EC2 instances to c6i.xlargec6i.xlarge (4 vCPU4\text{ vCPU}, 8 GiB8\text{ GiB} memory). Create a centralized NAT Gateway in a shared services VPC and share it with the member account using AWS Resource Access Manager (RAM). Purchase a 3-year Compute Savings Plan in the management account.

Cevap

Downsize the Fargate task configurations, migrate the EC2 instances to m6i.xlargem6i.xlarge (4 vCPU4\text{ vCPU}, 16 GiB16\text{ GiB} memory) using a rolling update, and purchase a 3-year Compute Savings Plan in the management account of the AWS Organization.
The correct strategy involves downsizing the Fargate tasks to match their low average utilization (10%10\% CPU, 15%15\% memory). For the EC2 fleet, because the peak memory utilization is 13.5 GiB13.5\text{ GiB}, downsizing to c6i.xlargec6i.xlarge (8 GiB8\text{ GiB} memory) is not feasible as it would lead to out-of-memory errors. The best approach is to switch to a general-purpose m6i.xlargem6i.xlarge instance (4 vCPU4\text{ vCPU}, 16 GiB16\text{ GiB} memory), which accommodates both the CPU and memory requirements while lowering cost. To apply discounts to both Fargate and EC2, a Compute Savings Plan must be purchased in the management account. A rolling update (instance refresh) guarantees zero downtime.

Adım Adım Çözüm

1
Analyze Fargate utilization metrics and downsize configurations.
The Fargate tasks run at 10%10\% CPU and 15%15\% memory, meaning they are over-provisioned. Downsizing their configurations directly reduces compute costs.
Aligns resource limits with actual workload demands to eliminate waste.
2
Determine the optimal sizing for the EC2 instances based on peak memory requirements.
The c6i.2xlargec6i.2xlarge instances run at 40%40\% average CPU (3.2 vCPU3.2\text{ vCPU}) and 13.5 GiB13.5\text{ GiB} peak memory. Changing to c6i.xlargec6i.xlarge (8 GiB8\text{ GiB} memory) would cause out-of-memory failures. Transitioning to m6i.xlargem6i.xlarge (4 vCPU4\text{ vCPU}, 16 GiB16\text{ GiB} memory) provides sufficient CPU and memory capacity at a lower cost.
Ensures that performance is not degraded during peaks while optimizing instance costs.
3
Select the correct Savings Plan type to cover the hybrid Fargate and EC2 environment.
A Compute Savings Plan covers both EC2 instances (regardless of family or region) and AWS Fargate tasks across all member accounts when purchased in the management account. An EC2 Instance Savings Plan would not cover the Fargate tasks and lacks flexibility across families.
Maximizes the discount coverage for the entire organization's compute footprint.

Anahtar Kavram

Compute Resource Right-Sizing and Savings Plans Optimization
Bu soruyu puanla