title: Terminate EC2 instance after AWS Batch is succeeded
body: <p>I am running a simple java HelloWorld program using docker container in AWS Batch. I have created a managed Compute Environment with following values</p>
  
  <p>Minimum vCPUs 0</p>
  
  <p>Desired vCPUs 0</p>
  
  <p>Maximum vCPUs 256</p>
  
  <p>Instance types optimal</p>
  
  <p>On submitting the Job, the job is executed successfully i.e. the job is submitted to the queue, the scheduler provisions the ec2 instance ( with aws-ecs agent container and java helloworld container which is specified in Job Definition) and the job is successfully completed with the logs in CloudWatch Stream.</p>
  
  <p>My issue is that after the job is succeeded the compute environment (ec2 instance) provisioned by scheduler still keeps on running instead of terminating.</p>
  
  <p>Pls. suggest if I am missing anything.</p>