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

1k views Asked by At

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.

2

There are 2 answers

0
John Rotenstein On BEST ANSWER

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.

3
Richard Davis On

Given your source images will (presumably) be at a higher resolution than those you are creating, and that once processed, they will not need to be accessed regularly after while (again, presumably), I would suggest that the lower cost of S3 and the archiving options available there means it would be best for you. There's a more in depth answer here:

AWS EFS vs EBS vs S3 (differences & when to use?)