ECS service auto scaling automatically adjusts the number of running tasks in your ECS service based on demand to keep your application responsive and cost-efficient.
Click to reveal answer
beginner
Which AWS service manages ECS service auto scaling policies?
AWS Application Auto Scaling manages ECS service auto scaling policies by adjusting the desired count of tasks based on scaling rules.
Click to reveal answer
intermediate
What is a target tracking scaling policy in ECS service auto scaling?
A target tracking scaling policy adjusts the number of tasks to keep a specific metric, like CPU utilization, at a target value automatically.
Click to reveal answer
beginner
Why is it important to set minimum and maximum task counts in ECS service auto scaling?
Setting minimum and maximum task counts prevents your service from scaling too low (causing downtime) or too high (wasting resources and money).
Click to reveal answer
beginner
How does ECS service auto scaling improve application availability?
By automatically adding tasks when demand increases and removing tasks when demand decreases, ECS service auto scaling keeps the application responsive and available.
Click to reveal answer
What does ECS service auto scaling adjust automatically?
AAmount of storage in S3
BNumber of running tasks in a service
CSize of EC2 instances
DNumber of VPC subnets
✗ Incorrect
ECS service auto scaling changes the number of running tasks to match demand.
Which metric is commonly used in target tracking scaling policies for ECS?
ANetwork latency
BNumber of S3 buckets
CCPU utilization
DDisk IOPS
✗ Incorrect
CPU utilization is a common metric to keep at a target level for scaling ECS tasks.
What AWS service do you configure to enable ECS service auto scaling?
AApplication Auto Scaling
BAWS Lambda
CAmazon RDS
DAWS CloudTrail
✗ Incorrect
Application Auto Scaling manages scaling policies for ECS services.
Why should you set a maximum task count in ECS auto scaling?
ATo avoid excessive resource use and cost
BTo increase network speed
CTo reduce storage costs
DTo limit API calls
✗ Incorrect
A maximum task count prevents scaling beyond what is needed, saving cost and resources.
What happens if ECS service auto scaling is not configured?
AS3 storage scales automatically
BTasks automatically scale perfectly
CEC2 instances scale automatically
DTasks stay fixed and may not handle demand changes
✗ Incorrect
Without auto scaling, the number of tasks stays fixed and may cause slow response or wasted resources.
Explain how ECS service auto scaling works and why it is useful.
Think about how a restaurant adds or removes staff based on customers.
You got /4 concepts.
Describe the role of Application Auto Scaling in ECS service auto scaling.
It’s like the manager who decides when to add or remove workers.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of ECS service auto scaling?
easy
A. Store container logs for analysis
B. Manually start and stop containers
C. Automatically adjust the number of running containers based on demand
D. Create new ECS clusters automatically
Solution
Step 1: Understand ECS service auto scaling function
ECS service auto scaling changes the number of containers automatically to match workload.
Step 2: Compare options to this function
Only Automatically adjust the number of running containers based on demand describes automatic adjustment of container count based on demand.
Final Answer:
Automatically adjust the number of running containers based on demand -> Option C
Quick Check:
Auto scaling adjusts container count = Automatically adjust containers [OK]
Hint: Auto scaling means automatic container count changes [OK]
Common Mistakes:
Confusing auto scaling with manual container management
Thinking auto scaling creates clusters
Believing auto scaling stores logs
2. Which of the following is the correct way to specify a target tracking scaling policy for CPU utilization in ECS service auto scaling?
easy
A. "TargetValue": 50, "PredefinedMetricSpecification": {"PredefinedMetricType": "ECSServiceAverageCPUUtilization"}
B. "TargetValue": "high", "PredefinedMetricSpecification": {"PredefinedMetricType": "CPUUsage"}
C. "TargetValue": 100, "MetricName": "MemoryUtilization"
D. "TargetValue": 30, "PredefinedMetricSpecification": {"PredefinedMetricType": "NetworkIn"}
Solution
Step 1: Identify correct metric type for CPU utilization
The predefined metric for ECS CPU is "ECSServiceAverageCPUUtilization" with a numeric target value.
Step 2: Check option syntax and metric correctness
"TargetValue": 50, "PredefinedMetricSpecification": {"PredefinedMetricType": "ECSServiceAverageCPUUtilization"} uses correct metric type and numeric target value 50, which is valid.
Final Answer:
"TargetValue": 50, "PredefinedMetricSpecification": {"PredefinedMetricType": "ECSServiceAverageCPUUtilization"} -> Option A
What happens when CPU utilization stays at 70% for a long time?
medium
A. The service scales up to 5 containers to reduce CPU load
B. The service scales down to 2 containers to save cost
C. The service keeps running 2 containers without change
D. The service crashes due to high CPU
Solution
Step 1: Understand scaling triggers from CPU target
TargetValue 60 means ECS tries to keep CPU near 60%. If CPU is 70%, it needs more containers.
Step 2: Apply min and max capacity limits
Min is 2, max is 5. Scaling up is allowed up to 5 containers to reduce CPU load.
Final Answer:
The service scales up to 5 containers to reduce CPU load -> Option A
Quick Check:
CPU above target scales up containers = The service scales up to 5 containers to reduce CPU load [OK]
Hint: CPU above target scales up, below scales down [OK]
Common Mistakes:
Thinking service scales down when CPU is high
Ignoring max capacity limit
Assuming service crashes on high CPU
4. You configured ECS service auto scaling but the service never scales out even when CPU is high. What is a likely cause?
medium
A. The service has no load balancer attached
B. The target CPU utilization is set to 100%
C. The ECS cluster has no running tasks
D. The maximum capacity is set equal to the minimum capacity
Solution
Step 1: Analyze scaling limits
If max capacity equals min capacity, no room to scale out exists.
Step 2: Check other options
Target 100% means scaling triggers only at max CPU, but scaling can still happen. No running tasks or load balancer affect service but not scaling limits directly.
Final Answer:
The maximum capacity is set equal to the minimum capacity -> Option D
Quick Check:
Max equals min blocks scaling out = The maximum capacity is set equal to the minimum capacity [OK]
Hint: Max capacity must be greater than min capacity to scale out [OK]
Common Mistakes:
Ignoring max and min capacity settings
Assuming load balancer affects scaling triggers
Confusing target CPU with scaling limits
5. You want to configure ECS service auto scaling to keep container count between 3 and 10, scaling based on memory usage targeting 70%. Which configuration is correct?
hard
A. MinCapacity: 10, MaxCapacity: 3, TargetValue: 70, PredefinedMetricType: ECSServiceAverageMemoryUtilization
B. MinCapacity: 3, MaxCapacity: 10, TargetValue: 70, PredefinedMetricType: ECSServiceAverageMemoryUtilization
C. MinCapacity: 3, MaxCapacity: 10, TargetValue: 70, PredefinedMetricType: ECSServiceAverageCPUUtilization
D. MinCapacity: 3, MaxCapacity: 10, TargetValue: 30, PredefinedMetricType: ECSServiceAverageMemoryUtilization
Solution
Step 1: Set correct min and max container counts
MinCapacity must be less than MaxCapacity, so 3 and 10 is valid, 10 and 3 is invalid.
Step 2: Use correct metric and target value for memory
Memory scaling uses ECSServiceAverageMemoryUtilization with target 70% to trigger scaling.