How to use AWS Batch

amazon-web-services

I am trying to use the new AWS Batch feature: https://aws.amazon.com/batch/

I cannot get even the simplest Batch job to run (using the demo which is "echo hello world"). The job just keeps getting stuck in the runnable state.

To try and isolate the issue, I am using all of the default settings on a brand new AWS account.

My understanding is that I should not have to launch any EC2 instances manually to use this feature, that AWS Batch should do this for me.
It seems to be waiting for an available EC2 instance to run the job, though. Shouldn't it just start up an EC2 instance to run the job by itself?

Thanks in advance.

Best Answer

I noticed that when I specified a job definition with 8000 MiB an instance would be spun up that only had 7986MB and my job would get stuck in the Runnable state.

8000 MiB is equal to 8388.608MB so it looks like the instance being spun up doesn't have enough memory available to run the job and so it hangs.

If I create a job definition with 7000 MiB than my job no longer gets stuck in the Runnable state as it still uses the same instance with 7986MB of memory.