Search Topics

The Ultimate guide to host Images using Amazon S3 & Cloudfront (3 posts)

  • Started 9 months ago by Ashish Mohta
  • Latest reply from Ashish Mohta
  1. Ashish Mohta
    Key Master

    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/

    Posted 9 months ago #
  2. lobol
    Member

    Can any body share how much they have been billed by Amazon S3 ? I have scary thoughts and stories on that. Specially when you get hotlinked ? Does Amazon give any protection against hotlinking ?

    Posted 9 months ago #
  3. Ashish Mohta
    Key Master

    @lobol I had a talk with one Guy who uses it. He has PV like 1.8 to 1.9 Million and gets a bill around 300 to 400 $.

    Thats a little more but still feasible. Like if you have 500000 you would be charged around 60$ lets say.

    However Hotlinking is a bit of trouble here. I am not sure if Amazon Provides any support. You can mail their support id to find it.

    Posted 9 months ago #

Reply

You must log in to post.