Host a static website on AWS S3 and CloudFront with HTTPS

8 steps · about 1 h 57 min · Beginner

  1. Understand S3 static hosting (doc, AWS Docs, 10 min)

    Shows what S3 serves by itself and where its limits are.

  2. Upload a site to an S3 bucket (tutorial, AWS Docs, 20 min)

    Creates the bucket and index document you will front with CDN.

  3. Create a CloudFront distribution (tutorial, AWS Docs, 20 min)

    Puts a global cache and HTTPS in front of the bucket.

  4. Keep the bucket private with origin access control (doc, AWS Docs, 15 min)

    Lets only CloudFront read the content.

  5. Request a public TLS certificate (doc, AWS Docs, 12 min)

    Gives you a free managed certificate for your domain.

  6. Point your domain at CloudFront (doc, AWS Docs, 15 min)

    Connects the custom name with an alias record.

  7. Control caching and expiry (doc, AWS Docs, 15 min)

    Tunes how long edges keep each file.

  8. Invalidate cached files after a deploy (doc, AWS Docs, 10 min)

    Makes updates visible without waiting for expiry.