I want to know which will cost more, s3 or ec2.
I need to know by example to estimate my future payments.
Also which of them will be better for an image hosting website?
I want to know which will cost more, s3 or ec2.
I need to know by example to estimate my future payments.
Also which of them will be better for an image hosting website?
You can also use the AWS calculator, plug in your projected loads and un-toggle the 'free for a year' checkbox to get a truthful number.
As mentioned, EC2 and S3 are completely different - S3 is meant to serve as a file service supplement for your site resources.
In the bigger picture, you'd use EC2 to run the website - but if your site was big enough (100's of gigabytes) it'd be a good idea to consider S3 since it will scale better for system upgrades (Less MTTR, less backup space used).
AWS will also be a bit more graceful than an intensely loaded EBS backed site in terms of static data serving.
These services are not the same.
S3 is a a scalable storage service ( like a hard drive). ec2 is a virtual computer ( a computer).
So I think it is pretty obvious s3 would be better for image hosting.
That is like trying to compare apples and oranges... Both provide different feature sets.
That said if you're just talking about a static website displaying photos then S3+CloudFront might be your best choice since you won't need to computing power to process dynamic web pages using CGI, PHP, etc. The S3 storage costs are no where near as high as the hourly costs of running an EC2 instance. You'll be left with storage and bandwidth costs alone using S3+CloudFront. Using CloudFront allows you to put the S3 bucket you store your site in through Amazon's cDN network to provide scalability.