0
0
AWScloud~20 mins

ECS with ALB integration in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
ECS with ALB Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
ECS Service and ALB Target Group Association

You have an ECS service running tasks behind an Application Load Balancer (ALB). Which configuration ensures that the ALB correctly routes traffic to the ECS tasks?

ASet the ALB listener to forward traffic to the ECS cluster ARN.
BConfigure the ECS service to use the ALB target group by specifying the target group ARN in the service's load balancer settings.
CManually add the EC2 instances running ECS tasks as targets in the ALB target group.
DRegister the ECS service's task definition directly as a target in the ALB target group.
Attempts:
2 left
💡 Hint

Think about how ECS integrates with ALB to manage dynamic task IPs.

service_behavior
intermediate
2:00remaining
Health Check Behavior in ECS with ALB

When using an ALB with ECS, what happens if a task fails the ALB health check?

AThe ALB stops sending traffic to the task, but ECS does not replace the task automatically.
BThe ECS service scales down the number of tasks to reduce load.
CThe ALB redirects traffic to a default target group until the task recovers.
DThe ECS service automatically stops and replaces the unhealthy task to maintain the desired count.
Attempts:
2 left
💡 Hint

Consider how ECS maintains service availability with unhealthy tasks.

security
advanced
2:00remaining
Securing ECS Tasks Behind ALB

You want to ensure that only traffic from your ALB can reach your ECS tasks. Which security group configuration achieves this?

AAssign the same security group to both ALB and ECS tasks allowing all inbound traffic.
BAssign a security group to ECS tasks that allows inbound traffic from 0.0.0.0/0 on the task port.
CAssign a security group to ECS tasks that allows inbound traffic from the ALB's security group only.
DAssign a security group to ECS tasks that allows inbound traffic from the ECS cluster's security group.
Attempts:
2 left
💡 Hint

Think about how security groups reference each other to restrict traffic.

Configuration
advanced
2:00remaining
Configuring ECS Service with ALB Listener Rules

You have multiple ECS services behind one ALB. How do you configure the ALB to route requests to the correct ECS service?

AUse ALB listener rules with path-based routing to forward requests to different target groups for each ECS service.
BAssign the same target group to all ECS services and use ECS task definitions to differentiate traffic.
CCreate separate ALB listeners for each ECS service on different ports.
DUse DNS round-robin to distribute traffic evenly among ECS services.
Attempts:
2 left
💡 Hint

Consider how ALB can route traffic based on URL paths.

Best Practice
expert
3:00remaining
Optimizing ECS with ALB for High Availability

To maximize availability and fault tolerance for an ECS service behind an ALB, which setup is best?

ADeploy ECS tasks across multiple Availability Zones and enable ALB cross-zone load balancing.
BDeploy ECS tasks in a single Availability Zone and configure ALB with cross-zone load balancing disabled.
CDeploy ECS tasks in multiple regions and use a Network Load Balancer instead of ALB.
DDeploy ECS tasks in a single Availability Zone and use ALB with sticky sessions enabled.
Attempts:
2 left
💡 Hint

Think about spreading risk and balancing traffic evenly.