Reputation: 2107
I have deployed a new PHP app on Amazon AWS using ElasticBeanstalk. The problem I am facing is whenever the EC2 instance is terminated my data in uploads folder get removed. What can I do to retain the data even if the EC2 instance is terminated or a new instance is created.
Upvotes: 2
Views: 194
Reputation: 522
S3 is the way to go to store persistent files as suggested by Bulk. Additionally you can use Azamon CloudFront (CDN) to serve the static content. I have found the following example to upload to S3 using PHP. Here is another PHP class to upload files to S3.
Upvotes: 0
Reputation: 5685
You will need to create an S3 bucket and store any persistent files in that - as you've discovered EC2 instances to not have any persistent storage of their own.
Upvotes: 1