user12628865
user12628865

Reputation:

Should I use an s3 bucket for my files or should I just stick to my ec2 instance

I have an aws ec2 instance running and I'm wondering if I really need to use an s3 bucket to store files that users upload or if I should just store the files onto my ec2 instance. Which technqiue is more safe and costs less, etc. Any answer will be appreciated.

Upvotes: 4

Views: 1246

Answers (2)

Anton
Anton

Reputation: 4052

Cost part is easy to answer. Safe/secure - to some extent too.

S3 would simply cost you $0.023/Gb per month https://aws.amazon.com/s3/pricing/ some cheaper options for infrequently accessed data are also available.

If you are sticking with EC2 - your files would be stored in EBS volumes - and the cost would be 0.10/Gb per month. https://aws.amazon.com/ebs/pricing/

So - at least 4x difference here.

That's oversimplified. Ideally, for EC2 you need at least 2 instances with 2 sets of volumes, so - 8x. Add here backups, some headroom for storage... you'll be easily looking at EC2 being 10+x more expensive option.

S3 gives you 11 nines. That's 99.999999999% durability out of the box. Without any extra effort on your side. Good luck doing it yourself with EC2/EBS.

Upvotes: 0

jarmod
jarmod

Reputation: 78563

Valuable reading: Treat your servers like cattle, not pets.

You're asking for an opinion, which is not really Stack Overflow's space, but here's an opinion: don't let your EC2 instance be the storage of record for your user's data, regardless of the cost. As it happens, S3 is both extremely cheap and beyond extremely durable.

Upvotes: 2

Related Questions