Cloudfront is a CDN designed for global content delivery. However, recent improvements allow it to act not only as a CDN, but also as a cache similar(ish) to Varnish.

People originally had to use Cloudfront by uploading their media to Amazon S3. Cloudfront then served those static assets from the S3 bucket. This means that within a coded application, developers needed to upload assets to S3 and then point URLs within their HTML (and perhaps in user-generated content) to a Cloudfront URL.

.. For instance, if you have a file example.com/css/styes.css, your Cloudfront URLabcxyz.cloudfront.net/css/styles.css will grab example.com/css/styes.css and then serve a cached version of that stylesheet for future visitors.

Within your own HTML, of course, you set the URL of styles.css to be your Cloudfront URLabcxyz.cloudfront.net/css/styles.css.