1 Answer
- Newest
- Most votes
- Most comments
0
To give access to Fargate containers from AWS Batch jobs interface, you can create an IAM Role that grants the necessary permissions to access the AWS services that your application requires, such as S3 or DynamoDB. You can then specify this role in your job definition when you submit a job to AWS Batch.
To do this, follow these steps:
- Create an IAM role with the necessary permissions for your application to access AWS services. You can use the AWS Management Console, AWS CLI, or AWS SDKs to create the role. Make sure to grant the appropriate permissions to access the services you need, and attach the role to the ECS task execution role.
- Create an AWS Batch job definition that specifies the container image, environment variables, and any other configuration options for your Fargate container.
- In the job definition, specify the IAM role you created in step 1 using the executionRoleArn parameter. This will grant the Fargate container the necessary permissions to access AWS services.
- Submit a job to AWS Batch using the job definition you created in step 2. The job will run with the permissions granted by the IAM role specified in the job definition.
By following these steps, you should be able to give access via role to Fargate container from AWS Batch jobs interface, without needing to pass your AWS ID and AWS SECRET as environment variables.
answered a year ago
Relevant content
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
@Yasser That was my point I gave both roles (execution and job role) even admin privillage and I till get the above error unless I pass the env. So the role maybe is not loaded properly in the docker container