4👍
✅
With IAM roles for Amazon ECS tasks, you can specify an IAM role that can be used by the containers in a task to access AWS resources.
0👍
With Cloud Formation, you need to add a TaskRoleArn
to the TaskDefinition.Properties
. Then you need to add appropriate policies to the role to have permissions that are used in your task code.
Source:stackexchange.com