Is there any way to persist files for a web application using Amazon AWS without a full VM?

I would like to migrate an web application to Amazon AWS.

The application stores and retrieves small persistent data from a content/ directory. I tried Amazon Elastic Beanstalk to deploy the application however new stored files are lost when the instance is restarted or a new build is deployed.

The Amazon solution to use beanstalk is to create a s3 bucket and use Amazon APIs to store data.

I rather not modify our code and create total dependency to Amazon Services.

Is there any way to migrate my application without change the code to amazon services. I would like to do not create a full VM just to run the application.


Solution 1:

EBS volumes in Elastic Beanstalk are not considered persistent. Your options are:

  • S3 - code change likely required
  • A database, RDS or DynamoDB - code change required
  • EFS (Elastic File System) - code change not required, so this is likely your best solution. This is an NFS 4.1 compliant store, is persistent, so it won't lock you to AWS. You could run on premise or in another cloud.

There's a guide on how to use EFS with Elastic Beanstalk here. It's configuration which sits outside the application.