Protecting your static website hosted on AWS S3 and served through CloudFront is crucial for maintaining security and controlling access. One efficient method to achieve this is by implementing password protection using Lambda@Edge. This Podcast will walk you through the process step-by-step.
https://businesscompassllc.com/how-to-password-protect-a-static-site-hosted-on-aws-using-s3-cloudfront-and-lambdaedge/