Which role do I have to use for the Fargate tasks on AWS Batch?

0

I'm running Fargate in AWS Batch. If I want to give the task S3 access, which of the following Roles should I add the policy to?

  • AWS Batch execution IAM role
  • job role

I know that Fargate uses task roles. However, there was no setting item called task role in AWS Batch.

Best regards,

SDOne
已提問 2 年前檢視次數 1639 次
1 個回答
2
已接受的答案

It's job role. The Job role configuration field in the UI has this bulrb: "You can optionally specify an IAM role that provides the container in your job with permissions to use the AWS APIs. This feature uses Amazon ECS IAM roles for tasks functionality." That is what you want to use if you want to grant the process in your container access to, say, S3 (or any other AWS service).

The job execution role is assigned to the low level agent and it enables it to pull the container image from ECR, it enables it to read from Secrets Manager and pass the secrets to the containers as variable, and a few other low level infra things.

AWS
專家
已回答 2 年前
profile picture
專家
已審閱 10 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南