subscribe

Restrict access to a static S3 site using HTTP Basic Auth

In this video we add basic auth to an s3 bucket containing a static website.

This way, the browser will display an authentication dialog and require a username and password to get access to the static site. This will protect the files on our s3 bucket and limit access to them.

We use a cloudfront distribution and a lambda edge function that checks the request being made and authenticates the user.