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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠