I am running a simple java HelloWorld program using docker container in AWS Batch. I have created a managed Compute Environment with following values
Minimum vCPUs 0
Desired vCPUs 0
Maximum vCPUs 256
Instance types optimal
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.
My issue is that after the job is succeeded the compute environment (ec2 instance) provisioned by scheduler still keeps on running instead of terminating.
Pls. suggest if I am missing anything.