How do I create a role for AWS Batch using the CLI

0

How do I create a role for AWS Batch jobs on EC2 using the CLI? The role needs to have read-write permissions to an S3 bucket, e.g. s3://mybucket234. The role will be needed for the "aws batch create-compute-environment" command.

1回答
0

Hi.

You create an ECS-trusted IAM role as follows:

https://docs.aws.amazon.com/batch/latest/userguide/instance_IAM_role.html

When using the CLI, use the create-role command.

https://docs.aws.amazon.com/cli/latest/reference/iam/create-role.html

Trust the service using AssumeRole at creation time. Please refer to the following for the method.

https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_policy-examples.html

profile picture
エキスパート
iwasa
回答済み 2年前

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

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

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

関連するコンテンツ