I was asked how to save all the magento media assets in Amazon S3. I thought about using a PHP Stream Wrapper like this one: https://github.com/punkave/aS3StreamWrapper and just set the media folder to s3:\mybucket\mediaFolder
Does anyone has experience with this?
Or better use something like this: https://github.com/sstoiana/magento-s3
But this extension doesn't look good. Any other recommendations?
Best Answer
it seems these guys find a solution: ( http://thinkglobal.co/resources/moving-the-magento-media-directory-to-s3/ )
There are 2 possible approaches, one being to have Magento push all media assets to S3 as they are created and the other being to simply mount the media directory to an S3 bucket and let Magento think that it’s writing to the local disk. We chose the latter.
We ended up using a tool called s3fs, which uses a broader technology called fuse. With some fairly straightforward configuration (described below), you can get s3fs up and running. Be careful not to hardcode S3 bucket names or API access credentials if you are using AWS or other PAAS provider.
Make sure you replace the following variables with values for your specific configuration:
Here is the setup: