0
0
AWScloud~20 mins

ECS service auto scaling in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
ECS Auto Scaling Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
ECS Service Auto Scaling Behavior

What happens when an ECS service's auto scaling policy triggers a scale-out action?

AThe ECS service scales the underlying EC2 instances but does not change the number of tasks.
BThe ECS service stops existing tasks before launching new ones to maintain the current count.
CThe ECS service queues scaling requests and applies them only during the next deployment.
DThe ECS service immediately launches new tasks to match the desired count set by the scaling policy.
Attempts:
2 left
💡 Hint

Think about how ECS manages task counts when scaling.

Configuration
intermediate
2:00remaining
Configuring ECS Service Auto Scaling Target

Which AWS resource must you specify as the scalable target when configuring ECS service auto scaling?

AThe ECS task definition revision number as a scalable target with resource ID format: taskdef/task-def-name
BThe ECS service's task count as a scalable target with resource ID format: service/cluster-name/service-name
CThe ECS cluster's EC2 instance count as a scalable target with resource ID format: cluster/cluster-name
DThe ECS service's load balancer target group as a scalable target with resource ID format: targetgroup/target-group-name
Attempts:
2 left
💡 Hint

Auto scaling targets the number of tasks running in the service.

Architecture
advanced
2:00remaining
Designing ECS Auto Scaling with CloudWatch Alarms

You want to scale your ECS service based on CPU usage. Which architecture component is essential to trigger scaling actions?

AA CloudWatch alarm monitoring the ECS service CPU utilization that triggers a scaling policy.
BAn AWS Lambda function that polls ECS tasks and adjusts the desired count manually.
CAn S3 event notification that triggers scaling when new objects are uploaded.
DA Route 53 health check that disables scaling when the service is unhealthy.
Attempts:
2 left
💡 Hint

Auto scaling reacts to metrics monitored by CloudWatch alarms.

security
advanced
2:00remaining
IAM Permissions for ECS Auto Scaling

Which IAM permission is required for an ECS service auto scaling role to update the desired task count?

A"cloudwatch:PutMetricAlarm" permission on CloudWatch alarms.
B"autoscaling:CreateScalingPolicy" permission on the Auto Scaling group.
C"ecs:UpdateService" permission on the ECS service resource.
D"ec2:RunInstances" permission on the EC2 instances.
Attempts:
2 left
💡 Hint

Think about what action changes the number of running tasks.

Best Practice
expert
2:00remaining
Best Practice for ECS Service Auto Scaling Cooldown Period

What is the best practice for setting the cooldown period in ECS service auto scaling policies?

ASet the cooldown period to allow enough time for tasks to start and stabilize before another scaling action.
BSet the cooldown period to zero to allow immediate consecutive scaling actions for fast response.
CSet the cooldown period longer than the deployment time of the ECS service to avoid any scaling.
DSet the cooldown period to match the CloudWatch alarm evaluation period regardless of task startup time.
Attempts:
2 left
💡 Hint

Consider how quickly tasks become healthy after scaling.