Amazon S3 newbie question

timned88

Joined: 2011-08-31
Posts: 88
Posted: Thu, 2012-05-10 09:10

I recently signed up for Amazon S3 as a way to reduce the disk space footprint on my webserver (I get 8000mb and am dangerously close to the limit). Am I correct in assuming that once my Gallery3 images are uploaded to the Amazon bucket, I can remove them from my server? Or will that cause them to be removed from Gallery3 at the next synchronization?

I check some of the URLs on the pictures and it is showing the Amazon S3 URL.

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Thu, 2012-05-10 21:07

No, the Amazon module doesn't do that. Yes, the module uploads the photos to S3. Yes, it then serves the images directly from S3. But, if you remove the files from your local server storage, you will break G3. Any time you go to perform an action (resize, rotate, etc), move an image to a new album, and I think even change permissions in some circumstances, G3 will crash because it can't find the file. It still expects the file to be locally accessible in order for it, and other modules also dependent on the files existing, to function. All it's using S3 for is a kind of Content Distribution Network (CDN), to offload the traffic generated by your server having to send images to users over and over again, it offloads it to S3, where storage and bandwidth is dirt cheap, leaving your server concentrate on the task of creating the G3 pages themselves (the HTML behind it).

Primary storage on S3 was a popular request for this module to support. However, after much contemplation and deliberation, this may not actually be possible, due to restrictions on G3's modular framework/design and the underlying design of Kohana (the framework G3 is built on top of). I have a couple of other ideas that may just work. I'm slowly working on an update to 2.2 (so 2.3) which resolves a couple of other issues, and attempt to get it functioning with CloudFront (lesser requested, but it's something I need). Primary Storage was eyed up for v3. If it's even remotely possible, v3 will see that feature. If not, v3 will never be released.

Dan

danneh.org :: Gallery3