Docusaurus v3 deployment with AWS S3 and Cloudfront
· 6 min read
Docusaurus v3 is out, but official docs are still lacking deployment to AWS as option.
Let me fix this and guide you how to create most secure and up to date approach with AWS S3 and Cloudfront.
tip
TL;DR final approach:
- private S3 bucket without website static hosting enabled
- Cloudfront distribution with Origin Access Control (OAC)
- Cloudfront Function to handle redirects to index.html
You can skip development instructions and go to full samples source code available at https://github.com/ahanoff/how-to/tree/main/docusaurus-3-deployment-with-s3-and-cloudfront
Docusaurus is static website generator, so let's review options AWS offers us to serve it.