title: AWS CloudWatch Rule returns FailedInvocation with AWS batch as Target
body: <p>Hi I've scheduled a Cloudwatch <strong>rule</strong> in order to run every Wednesday at 14.15 GTM <em>by having as target an AWS Batch</em>, which always returns <strong>FailedInvocation</strong>. I'm seeing the FailedInvocation event from associated metrics</p>
  
  <p>However there are no logs regarding the error, I cannot understand the problem.</p>
  
  <p>I've followed this tutorial: <a href="https://docs.aws.amazon.com/batch/latest/userguide/batch-cwe-target.html" rel="noreferrer">https://docs.aws.amazon.com/batch/latest/userguide/batch-cwe-target.html</a>
  I'm stucked here from hours any suggestion?</p>
  
  <h2>CONFIGURATIONS</h2>
  
  <p>The AWS batch target is configured as is: </p>
  
  <ul>
  <li>job Queue= <em>arn:..</em></li>
  <li>job Definition = <em>arn:...</em></li>
  <li>Job Name = <em>name</em></li>
  </ul>
  
  <p>The role associated to the target has the following policies:</p>
  
  <ul>
  <li><p><strong>arn:aws:iam::aws:policy/service-role/AWSBatchServiceEventTargetRole</strong></p>
  
  <pre><code>{
  "Version": "2012-10-17",
  "Statement": [
      {
          "Effect": "Allow",
          "Action": [
              "batch:SubmitJob"
          ],
          "Resource": "*"
      }
    ]
    }
  </code></pre></li>
  <li><p><strong>arn:aws:iam::216314997889:role/awsInvokeActionOnEc2</strong></p>
  
  <pre><code>{
  "Version": "2012-10-17",
  "Statement": [
      {
          "Effect": "Allow",
          "Action": [
              "cloudwatch:Describe*",
              "ec2:Describe*",
              "ec2:RebootInstances",
              "ec2:StopInstances",
              "ec2:TerminateInstances"
          ],
          "Resource": "*"
      }
  ]
  }
  </code></pre></li>
  <li><p>and <strong>Trust relationships</strong></p>
  
  <pre><code>{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "events.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
   ]
  }
  </code></pre></li>
  </ul>