Search code examples
phpamazon-web-servicesamazon-s3amazon-efs

S3 or EFS - Which one is best to create dynamic image from set of images?


I have a quiz site which creates images from a set of source images, the result images are stored in S3 and i don't care about it. My question is about source images, S3 or EFS is better for storing the source images for this purpose. I am using php to create result images.


Solution

  • Here's a general rule for you: Always use Amazon S3 unless you have a reason to do otherwise.

    Why?

    • It has unlimited storage
    • The data is replicated for resilience
    • It is accessible from anywhere (given the right permissions)
    • It has various cost options
    • Can be accessed by AWS Lambda functions

    The alternative is a local disk (EBS) or a shared file system (EFS). They are more expensive, can only be accessed from EC2 and take some amount of management. However, they have the benefit that they act as a directly-attached storage device, so your code can reference it directly without having to upload/download.

    So, if your code needs the files locally, the EFS would be a better choice. But if you code can handle S3 (download from it, use the files, upload the results), then S3 is a better option.