
Answer-first summary for fast verification
Answer: Use AWS Application Auto Scaling with target tracking policies to scale when ECS metric breaches trigger an Amazon CloudWatch alarm.
## Explanation **Correct Answer: D** - Use AWS Application Auto Scaling with target tracking policies to scale when ECS metric breaches trigger an Amazon CloudWatch alarm. ### Why Option D is Correct: 1. **AWS Application Auto Scaling** is specifically designed for scaling AWS services like Amazon ECS, Amazon EC2 Spot Fleets, Amazon DynamoDB, and Amazon Aurora. It provides automatic scaling for these services based on CloudWatch metrics. 2. **Target Tracking Scaling Policies** are the most efficient way to scale ECS services with Fargate launch type. These policies: - Automatically adjust the number of tasks to maintain a specific target metric value (like CPU utilization at 70%) - Scale out when the metric is above the target - Scale in when the metric is below the target - Automatically create CloudWatch alarms and manage them 3. **Fargate Launch Type Compatibility**: Since the company is using Fargate launch type, EC2 Auto Scaling (Options A and C) is not appropriate because Fargate abstracts away the underlying EC2 instances. With Fargate, you scale tasks, not EC2 instances. 4. **Cost Optimization**: Target tracking policies automatically scale in when utilization decreases, which directly addresses the requirement to "reduce costs when utilization decreases." ### Why Other Options are Incorrect: **Option A**: Incorrect because: - EC2 Auto Scaling is for scaling EC2 instances, not ECS tasks - Fargate doesn't use EC2 instances that you manage - Scheduled scaling based on previous patterns may not respond to actual utilization changes **Option B**: Incorrect because: - While Lambda could be used, it's unnecessarily complex - AWS Application Auto Scaling is the native, managed service designed specifically for this purpose - Requires custom code and maintenance compared to a managed service **Option C**: Incorrect because: - EC2 Auto Scaling is for EC2 instances, not ECS tasks - Simple scaling policies are less sophisticated than target tracking - Doesn't work with Fargate launch type ### Key AWS Services Mentioned: - **Amazon ECS with Fargate**: Serverless compute engine for containers - **AWS Application Auto Scaling**: Service for scaling various AWS resources - **Amazon CloudWatch**: Monitoring service for collecting metrics and setting alarms - **Target Tracking Scaling Policies**: Policy type that maintains a specific metric value This solution provides automatic, responsive scaling based on actual utilization, ensuring optimal performance during high traffic while minimizing costs during low utilization periods.
Ultimate access to all questions.
No comments yet.
Author: LeetQuiz Editorial Team
A company is launching a new application deployed on an Amazon Elastic Container Service (Amazon ECS) cluster and is using the Fargate launch type for ECS tasks. The company is monitoring CPU and memory usage because it is expecting high traffic to the application upon its launch. However, the company wants to reduce costs when utilization decreases.
What should a solutions architect recommend?
A
Use Amazon EC2 Auto Scaling to scale at certain periods based on previous traffic patterns.
B
Use an AWS Lambda function to scale Amazon ECS based on metric breaches that trigger an Amazon CloudWatch alarm.
C
Use Amazon EC2 Auto Scaling with simple scaling policies to scale when ECS metric breaches trigger an Amazon CloudWatch alarm.
D
Use AWS Application Auto Scaling with target tracking policies to scale when ECS metric breaches trigger an Amazon CloudWatch alarm.