title: How to define root volume size in AWS batch
body: <p>I'm using AWS Batch and I found the root volume size too low for my task.</p>
  
  <p>I tried creating a new computing environment/job queue but there's not any option to set volume size. I tried changing launch configuration from <a href="https://console.aws.amazon.com/ec2/autoscaling/home?region=us-east-1#LaunchConfigurations:" rel="noreferrer">here</a> but the new launch configuration and/or autoscaling group are not considered by AWS Batch. I probably have to change <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/bootstrap_container_instance.html" rel="noreferrer">dm.basesize</a> but it is unclear where this should be done.</p>
  
  <p>So, I set up a custom AMI from Amazon 2 Linux with 500 GB of storage, and changed the <code>--storage-opt</code> with <code>dm.basesize=400GB</code> as indicated <a href="https://forums.aws.amazon.com/message.jspa?messageID=811761#811761" rel="noreferrer">here</a> but, although my instances are spawned, the jobs remain in RUNNABLE state indefinitely. I inspected the possible causes as defined <a href="https://stackoverflow.com/questions/48151332/why-are-aws-batch-jobs-stuck-in-runnable">here</a>, but i) "Enable auto-assign public IPv4 address" is checked, ii) the image should be good (it has been validated when creating the environment and it can be spawned), iii) I have a limit of 5 instances for such instance type (but I am unable to run even 1), iv) my role permissions should be ok - I used the same roles with a default amazonlinux image successfully, v) insufficient resources (the instance get spawned so I think this should not be the problem), vi) connectivity - it should be working since the autoscaling group displays a successful state.</p>
  
  <p>One possible solution may be to attach a specific AWS volume at runtime, but it would be limited and I'd like to find an automatic solution, since instead I'd have to manage several volumes for parallel execution.</p>
  
  <p>I also tried executing the task by piping input from an s3 bucket, analyzing the data and piping output to a second s3 bucket but I get <a href="https://stackoverflow.com/q/1434451/41977">Connection Reset by Peer</a> error each time, probably because the task runs for too long (I also set <code>--cli-read-timeout</code> to 0 but it doesn't fix it at all).</p>
  
  <p>Is there a way to configure root volume size for jobs in AWS batch?</p>