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年前1641ビュー
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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ