Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Persistent storage on Elastic Beanstalk

How can i attach persistent storage on Elastic Beanstalk ?

I know i need to have a .config file where i set the parameters of the environment to run every time an instance is created.

My goal is to have a volume, let's say 100GB, that even if the instances got deleted/terminated, i have this volume with persistent data where all instances can access to read from.

I could use S3 to store this data, but it would require changes to the application, and latency could be a problem.

This way i could access the filesystem like any common server.

like image 619
AFRC Avatar asked Nov 10 '14 20:11

AFRC


2 Answers

AWS now offer a solution called Elastic File System (Amazon EFS) that lets multiple instances access a shared file store.

like image 88
Alastair Irvine Avatar answered Sep 29 '22 09:09

Alastair Irvine


If your desire is to have a central data repository that all EC2 instances can access, then Amazon S3 would be your best option.

Normal disk volumes are provided via Elastic Block Store (EBS). EBS volumes can only be mounted to one EC2 instance at a time. Therefore, to share data that is contained on an EBS volume, you will need to use normal network sharing methods to mount network volumes.

However, if your goal is to provide shared access without one specific instance sharing a volume to other instances, then it is better to use S3 because it is accessible from all instances. It would likely be worth the effort of modifying your application to take advantage of S3.

like image 35
John Rotenstein Avatar answered Sep 29 '22 08:09

John Rotenstein