Why are AWS Batch Jobs stuck in RUNNABLE?

后端 未结 5 1909
你的背包
你的背包 2021-02-05 03:34

I use a computing environment of 0-256 m3.medium on demand instances. My Job definition requires 1 CPU and 3 GB of Ram, which m3.medium has.

What are possible reasons wh

5条回答
  •  说谎
    说谎 (楼主)
    2021-02-05 04:29

    The roles should be defined using, at least, the next policies and trusted relationships. If not, they will get stuck in RUNNABLE as they don't have the enough privileges to start:

     AWSBatchServiceRole

    • Attached policies: AWSBatchServiceRole
    • Trusted relationship: batch.amazonaws.com

      {
        "Version": "2012-10-17",
        "Statement": [
          {
            "Effect": "Allow",
            "Principal": {
               "Service": "batch.amazonaws.com"
             },
            "Action": "sts:AssumeRole"
          }
        ]
      }
      

    ecsInstanceRole

    • Attached policies: AmazonEC2ContainerServiceforEC2Role
    • Trusted relationship: ec2.amazonaws.com

      {
        "Version": "2012-10-17",
        "Statement": [
          {
            "Effect": "Allow",
            "Principal": {
               "Service": "ec2.amazonaws.com"
             },
            "Action": "sts:AssumeRole"
          }
        ]
      }
      

提交回复
热议问题