Currently when a user uploads a photo / video i upload it in root directory of my website.

/var/www/mysite/pics/hash/example_filename.jpg and /var/www/mysite/videos/hash/example_filename.mp4

I'm using move_uploaded_file(); to store them.

I'm having a confusion on what is difference in storing files in S3 and EFS and EC2.

Should i store my images/videos uploaded from user in S3 or EFS or EC2 ?

closed as off-topic by Chopper3, Jenny D, Sven Jan 25 '17 at 13:13

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.


First of all you've clearly done zero research yourself on this and that's something we expect all serverfault users to do - so bear that in mind please, 'must try harder' :)

EC2 is one of the compute aspects of AWS - it's the virtualised CPU and memory aspect, but importantly it's not where the disk images are stored.

EBS is block-level storage that very often contains the disk images that EC2 VMs ('Instances' in AWS-speak), it's just that though, block storage - that's be default dedicated to act as a disk for one single VM. There are various types to choose from based on your performance and budget needs. Also of note - EBS 'disks' are a set-size, if you want 20GB then that's what you get and what you pay for, regardless of how much data is actually stored in the disk image.

S3 is an object/file store only, as far as I know there's no current way to boot directly from a disk image stored there (that may change though), but it is essentially limitless, you only pay for what you store, and also it can be very easily setup to share any given file over the internet, usually via a http/s request. Its performance isn't as good as EBS but it's pretty good for web-based loads. That said it's not where you want to put a file to share out to thousands of people at the same time, you'd need a CDN like CloudFront or Akamai for that.

If you need internet access to your files, with comparatively-low numbers of concurrent users then S3 may very well be for you - it's pretty cheap, very flexible and kind of an industry-standard.

Either way do more research dude :)

  • ok so which one should i use ? if i want to store images/videos(like instagram/vine etc) ?? – Edward Snowden Jan 25 '17 at 12:41
  • 3
    Please revisit the first point made in this answer: you need to do some research yourself! – BE77Y Jan 25 '17 at 12:47
  • 3
    I second this answer completely. AWS offers very many services, that you need to research and understand to use them effectively. – Bruno9779 Jan 25 '17 at 13:06
  • You should use cloudedfront, which works with all 3. – jdog Jan 29 '17 at 3:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.