0

Hopefully I'm posting in the correct community!

I'm trying to set up a container to run on AWS Batch. I'm not doing anything fancy, more or less just following the default set-up with everything. I'm getting an error that seems to be related to the instance role or the permissions associated with the instance role.

The set-up goes without a hitch at first. I set up my compute environment, then my queue, then I add a basic job to the queue. The job ends up getting stuck in the runnable state, and then after 20 minutes or so, my compute environment becomes "INVALID" with this error:

CLIENT_ERROR - Invalid IamInstanceProfile: arn:aws:iam::001234567890:role/ecsInstanceRole (Service: AmazonAutoScaling; Status Code: 400; Error Code: ValidationError; Request ID: blah)

I read this troubleshooting guide, which seems to tackle related problems (though they aren't quite exact matches). I've tried recreating the environment 5 or 6 times with no luck. I've also tried deleting my existing roles and letting the manager recreate them. Most of the problems in the troubleshooting guide seem to stem from roles that were incorrectly set up in the AWS CLI or via some non-Batch console needs. The guide even reads "the AWS Batch console only displays roles that have the correct trust relationship for compute environments". But all of the roles I've used I've selected via the console, which would seem to imply that they're correctly permissioned.

Not sure what to do here, grateful for any help.

  • 1
    Can you verify the IAM role's ARN? I think that it has the path "service-role" in it e.g. arn:aws:iam::123456789012:role/service-role/AWSBatchServiceRole. – sudo Sep 16 '17 at 21:18
  • Yes, that's my service role (with different numbers of course). The instance role is as written in the error (just role/ecsInstanceRole, as opposed to say role/service-role/ecsInstanceRole). – Alex Alifimoff Sep 16 '17 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.