I've set up a S3 bucket and all my images/avatars are mapped to this bucket.
Now the images are being served from my S3 bucket instead of my server.
But i need to serve these images from Cloudfront instead of S3, as there are two major advantages of Cloudfront over S3.
1) Cloudfront is faster as it users edge location
2) Cloudfront is cheaper.
And as per amazon, S3 is meant for storage and cloudfront is meant for distribution
I've been googling for some time and i found this link:
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/MigrateS3ToCloudFront.html
But i cant make any headways on this.
Can you please guide me on how to achieve cloudfront serving of avatars.
In Jreviews cloudfront works flawlessly. I've set up a S3 bucket for jreviews, but jreviews has another setting wherein i can specify the cloudfront url for fetching content.
The work flow for jreviews is as follows
Jreviews uploads to S3 bucket (As per credentials)
S3 Bucket is mapped to a Cloudfront distribution in Amazon
Cloudfront URL is entered into the jreviews setting.
and all media files are served from cloudfront instead of S3.
regards