Why does ECS Task Definition accept roles arn OR name, but Batch Job Definition only accept roles ARN?

0

Hello,

This inconsistency between ECS and Batch is quite inconvenient for our multi-account CI/CD. There is no clear documentation from AWS about ARN vs Name in definition files. It is supported in one, but not the other.

This task-definition.json works for ECS:

{
    ...
    "taskRoleArn": "[TASK_ROLE_NAME]",
    "executionRoleArn": "[EXECUTION_ROLE_NAME]",
    ....
}

But trying to register a similar job-definition.json to Batch returns this error:

Error executing request, Exception : executionRoleArn batch-job-execution-role-dbt-runner is not an iam role arn, RequestId: c55d9c71-c330-4f8a-9043-b0956267b482

Thank you

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions