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.
asked 22 days ago10 views
1 Answers
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
answered 21 days ago
Relevant questions
How do I create a role for AWS Batch using the CLI
asked 22 days agoWhat IAM Permissions are needed to do a CreateJob for S3 Batch?
asked 3 years agoWhich role do I have to use for the Fargate tasks on AWS Batch?
Accepted Answerasked 5 months agoCan I get API Keys for a Service Role?
asked 5 months agoS3 permissions STS assume role bucket to bucket copy
Accepted Answerasked 5 years agoVerify permissions for the IAM role
asked 2 months agoHow do I troubleshoot Amazon S3 Batch Operations issues?
How to allow a role to attach role to an instance?
asked a year agoSSM Automation - Download file from S3 - Assume Role
asked 2 months agoCreate an IAM role to read from Secrets Manager
asked 2 years ago