Need help deciding between EBS vs S3 on Amazon Web Services

Viewed 16805

I'm working on a project that incorporates file storage and sharing features and after months of researching the best method to leverage AWS I'm still a little concerned.

Basically my decision is between using EBS storage to house user files or S3. The system will incorporate on-the-fly zip archiving when the user wants to download a handful of files. Also, when users download any files I don't want the URL to the files exposed.

The two best options I've come up with are:

  1. Have an EC2 instance which has a number of EBS volumes mounted to store user files.

    • pros: It seems much faster than S3, and zipping files from the EBS volume is straight forward.
    • cons: I believe Amazon caps how much EBS storage you can use and there is not as redundant as S3.
  2. After files are uploaded and processed, the system pushes those files to an S3 bucket for long term storage. When files are requested I will retrieve the files from S3 and output back to the client.

    • pros: Redundancy, no file storage limits
    • cons: It seems very SLOW, no way to mount an S3 bucket as a volume in filesystem, serving zipped files would mean transferring each file to the EC2 instance, zipping, and then finally sending output (again, slow!)

Are any of my assumptions flawed? Can anyone think of a better way of managing massive amounts of file storage?

5 Answers

The main question is where are you hosting. Since you said you are using a ec2 instance, which means you are leveraging AWS, I would go for EBS and then EFB if you need to scale.

S3 is great, but IMO it is mainly for if you are hosting your site with a different provider, like Namecheap, etc, and just want to use AWS for a database.

I don't think reliability durability matters much, especially when you consider that you can back up snapshots of your Ec2 and EFB.

I would go solely based on price. See which one is cheaper. If there is a significant performance difference (2-5 seconds USER wait time), I would maybe consider spending more for the faster one.

EFB is a method of scaling and might be cheaper than doing EBS. I believe Amazon recommends using EBS until it gets to a certain size and then switching to EFB.

Related