To allow containers within a task to interact with S3, we need to create an IAM Role for the task. In the search bar:
IAM
Next, in the left-hand menu:
On the creation page, enter and select the following information:
Next, to grant write permissions to S3:
AmazonS3FullAccess
to find the policy.Fill out the information on the final step:
ECSTaskFullAccessToS3Role
(or any name you prefer)Allows ECS tasks to call AWS services on your behalf.
(add a description for easy management)Click Create role to finish.
Done!