Search code examples
amazon-web-servicesamazon-ec2amazon-elastic-beanstalk

AWS Elastic Beanstalk - Increase Instance Disk Capacity


I'm trying to use ElasticBeanstalk for an app with some big initial space requirements. It exceeds the default 8GB capacity of the EBS disk on the EC2 instances.

I tried to increase the disk capacity by using a bigger EC2 instance type. For instance, I used an m3.large, which AWS tells me should provide me with 1x32GB of storage.

However, when the Beanstalk environment launches, it still only shows 8GB. I tried to run the "resize2fs" command on the instance, but it didn't expand the volume to anything over 8GB.

Does anyone know how to get bigger instance storage on ElasticBeanstalk environments?


Solution

  • The 8 GB disk you are seeing is an EBS root volume mounted on /. That's the same no matter what instance type you use, which is why it still only shows 8 GB. The 32 GB of storage is ephemeral storage attached to the instance (not EBS). It's possible that it's not mounting automatically but it's certainly there.

    Two options for you:

    1. You can try to get that 32 GB ephemeral storage mounted.

    2. You can create and mount a separate EBS volume of whatever size you need: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html

    Either way, you will need to make whatever changes are required to point to this new storage, where ever you mount it in the filesystem. That can be by changing your configurations or creating symlinks from the old location to the new filesystem.