I went through a lot of posts on Amazon S3, including which had been written long back. But two people who recently moved to Amazon and use Cloudfront had given the best. I have included the links at the end.
This is how you need to setup Amazon S3 to host images. I have add separate description if you want to use Amazon s3 only , Use the cloudfront and or if you have already a previous amazon s3 and want to move to cloudfront. Good Luck
Basic:
1.Amazon Account
2.Amazon AWS account
3.Signup for Amazon S3
4.Get Access ID and Secret key
5.Signup for CloudFront
Setup
1. Create Bucket :
Bucket name : img.sitename.com
Permissions : World:Read and Owner:Write / Edit ACL
ONLY AMAZON S3
Add custom DNS accoount
CNAME:
NAME : img
Type : CNAME
Value: img.sitename.com.s3.amazon.com
NAME : www.img
Type : CNAME
Value: img.sitename.com.s3.amazon.com
Only CloudFront ( With No pre existing Amazon S3 CNAME )
Creating Distribution for Cloud Front:
a. Select Any Folder : img.sitename.com.s3.amazon.com
b. Manage Distribution
c. Associate CName : img.sitename.com | Copy unique CF name for it : xxxx.cloudfront.com
d. Add CNAME:
NAME : img
Type : CNAME
Value: xxxx.cloudfront.com
NAME : www.img
Type : CNAME
Value: xxxx.cloudfront.com
For existing Amazon S3 to Cloudfront
Creating Distribution for Cloud Front:
a. Select Any Folder : img.sitename.com.s3.amazon.com
b. Manage Distribution
c. Associate CName : cache.sitename.com | Copy unique CF name for it : xxxx.cloudfront.com
d. Update CNAME:
OLD CNAME:
NAME : img
Type : CNAME
Value: img.sitename.com.s3.amazon.com ****
NAME : www.img
Type : CNAME
Value: img.sitename.com.s3.amazon.com ***
New Cname:
NAME : img
Type : CNAME
Value: xxxx.cloudfront.com
NAME : www.img
Type : CNAME
Value: xxxx.cloudfront.com
Here is the list of tutorials which you can follow at the end
Amazon S3 Introduction:
http://www.hongkiat.com/blog/amazon-s3-the-beginners-guide/
http://www.labnol.org/internet/tools/amazon-s3-simple-storage-service-guide/3889/
Amazon s3 Setup
http://www.labnol.org/internet/host-images-files-on-amazon-s3-storage/4923/
What is Amazon Bucket:
http://www.labnol.org/internet/tools/amazon-s3-buckets-tutorial/3890/
How to setup Amazon Cloudfront:
http://www.hongkiat.com/blog/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3/
http://www.labnol.org/internet/setup-content-delivery-network-with-amazon-s3-cloudfront/5446
How to reduce your Amazon s3 Bills
http://www.labnol.org/internet/lower-amazon-s3-bill-improve-website-loading-time/5193/