S3 image read/write from Beanstalk/EC2 Web application
S3 image read/write from Beanstalk/EC2 Web application I have a web application (Elastic Beanstalk managed PHP on a Linux EC2 instance) that allows the user to upload images. My concern is that if I upload my code I would first have to download all the images then re-upload them with my new code if they stay on EC2. So the obvious solution seems to be to move the image directory to S3. The approaches I've found so far are a mounted drive or the SDK. What I'm finding is that for both approachs it seems Elastic Beanstalk is running in a write protected drive location that is preventing me from accessing the other approaches. For instance, for the mounted drive, I can't recurse up enough directories to access the mounted drive. Beanstalk is running in /var/app/current/ and the mounted drive is located /var/s3-{bucket mount name}. If I try to access it (../../s3-{bucket mount name}) it looks for it in the same folder as my app. When I followed the instructions for the SDK ...
