How to add a custom 404 error page to a CloudFront website

If you followed my previous post on deploying a static website using S3, CloudFront, and Route53, you might have noticed that if you go to a page that doesn’t exist, you get a page that looks like this: This is because of the origin access control settings. AWS recommends using origin access control because it allows the S3 bucket containing your website files to restrict access to everyone except CloudFront....

September 18, 2023 · 2 min · Favian Flores

How to deploy a static website using AWS S3, CloudFront, and Route53

In this article, you will learn how to store a static website on S3, use CloudFront as a content delivery network to distribute your website globally, and finally, use Route53 to access your website from a custom domain of your choice. Before you start, you should have the files for your static website and a domain name with a hosted zone on Route53. Ultimately, you will have a website that uses HTTPS, is accessible from a custom domain, and is distributed globally, giving your users faster loading times....

September 15, 2023 · 4 min · Favian Flores