Creating Password-Protected Static Websites in S3

Using CloudFront and Lambda@Edge to allow password-protection of static website content hosted in S3
Hosting static websites in S3 is a well-understood domain; but what happens when you want to password-protect it? It’s a static website – there’s no webserver, so you can’t do password-based access control. Or can you? Read on to learn how.