laravelamazon-web-servicesamazon-s3amazon-efs

Where to store thousands of images in S3 or EFS of AWS?


I will make a project in the not too distant future, a project where we will be storing thousands of thousands of images in the course of time. I'm on a hard decision whether to use Amazon S3 or EFS to store those images. Both I think are a very good option, but my question goes to what would be the best service or what would be the best practice?

My application will be done with Laravel and I already did the integration of both services.

Most of the characteristics of the project are:

What do you recommend?


Solution

  • S3 is absolutely the right answer and practice. I have built numerous applications like you describe, some with 100s of millions of images, and S3 is superior. It also allows for flexibility such as your API returning the images as pre-signed URLs which will reduce load to your servers, images can be linked directly via static web hosting, and it provides lifecycle policies to archive less used data. Additionally, further integration with other AWS services is easy using event triggers.

    As for storing/uploading, S3 multi-part upload is very useful to both increase performance and increase reliability.

    EFS would make sense for your type of scenario if you were doing some intensive processing where you had a cluster of severs that needed lower latency with a shared file system - think HPC. EFS would also come at a higher cost and doesn't provide as many extensibility options or built-in features as S3. Your scenario doesn't sound like it requires EFS.

    http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html

    http://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html

    http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html

    http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html

    http://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html