Getting Started on AWSLanding zone and Amazon ECS on EC2 · live course guide
Home

Chapter 08 of 12

AMAZON ECS

The two IAM roles

Task execution role Task role
Used by The ECS agent, while starting the task Your application code, while it runs
Lets it Pull the image, write logs, read secrets at start Call other AWS services such as S3 or SQS
If missing or wrong The task never starts The task runs, then the app gets AccessDenied

Execution role gets the container up. Task role is what the container may do once it is up. Neither needs keys: ECS hands the task temporary credentials for the role.