You can mount EBS volumes in any Beanstalk environment. This volume will be available in EC2 instances.
You can do this using the ebextensions parameter settings. Create a file in the application source .ebextensions/01-ebs.config with the following contents:
option_settings: - namespace: aws:autoscaling:launchconfiguration option_name: BlockDeviceMappings value: /dev/sdj=:100,/dev/sdh=snap-51eef269,/dev/sdb=ephemeral0
The display format is the name of the device = where device mappings are listed as one line with mappings separated by commas. This example attaches to all instances in the autoscale group an empty 100 gigabyte Amazon EBS volume, an Amazon EBS volume with the snap-51eef269 label snapshot, and instance storage capacity.
Read more about this setting here . Read more about ebextensions here .
After you have installed the EBS volume for beanstalk instances, you can use volume mapping as described above to map directories to suit your needs.
Rohit banga
source share