Search code examples
amazon-s3amazon-ec2amazon-cloudfront

Amazon S3 or Cloudfront to host photos,css,js etc files?


I am trying to understand whats the difference between Amazon S3 and Cloudfront... since both 2 are cdns and i see some differences in their prices as well...

what im trying to do is host all my css,js,images and photos(added by their users like user profile image etc...) in a cdn since my ec2 instance disk is way too small and want the best performance from there...

should i choose amazon s3 or cloudfront?


Solution

  • S3 is a storage system, not a CDN. It is bound to a specific data center when you store data. It helps you hosting big amounts of data and share it between multiple application servers.

    Cloudfront automatically distributes data around the globe between multiple data centers. Use it if you want to ensure the shortest path for the files to your client.