Are there use cases that lend themselves better to Amazon cloudfront over s3 or the other way around? I\'m trying to understand the difference between the 2 through examples
Another major difference is that CloudFront allows you to mirror the site on your server. Cloudfront then caches the files such as images, mp3 or video using its content delivery network.
This saves you having to duplicate your assets as you would when you use Amazon S3.
However, after a file expires, CloudFront will fetch it again from your live site (at cost). So cloud front is best for frequently accessed files, and less so for infrequently accessed ones.
One way to set the file expiry for apache is in .htaccess. For example
Header set Cache-Control "max-age=648000, private"