Fast Static Site Deployment on AWS with Pulumi YAML
This is a submission for the Pulumi Deploy and Document Challenge: Fast Static Website Deployment
What I Built
I built a fast, responsive, and lightweight static documentation site powered by Docsify, hosted on AWS S3 with a CloudFront CDN for global distribution. The entire infrastructure is managed using Pulumi YAML, allowing me to declaratively define and deploy resources without writing any imperative code.
This setup is perfect for:
- Personal documentation sites
- Open-source project documentation
- Simple landing pages or portfolios
Demo
YouTube walkthrough: Coming Soon!
Project Repo
GitHub: MakendranG/docsify-on-aws
The repository includes:
Pulumi YAML configuration for AWS S3 & CloudFront
index.html
with Docsify integrationA step-by-step
README.md
to reproduce the deployment
My Journey
I wanted to explore Pulumi’s YAML capabilities by deploying a real-world use case—serving a documentation site. I chose Docsify because it’s simple and doesn’t require a build step.
Key Steps:
-
Repo Setup: I initialized a GitHub repo with a
www/
folder containing myindex.html
and static assets. - Pulumi Init: Initialized a new Pulumi project with YAML runtime.
- AWS Infra: Defined an S3 bucket, website configuration, ownership and access settings, and CloudFront distribution.
-
Fixing Errors: Faced YAML struct issues and permission errors (like
PutBucketPolicy
), resolved by tweaking the IAM policy and ensuring public access configs. -
Deployment: Once configured correctly, everything deployed smoothly via
pulumi up
.
Using Pulumi
Pulumi helped streamline the whole process:
- Declarative YAML made infrastructure as code very beginner-friendly.
- Pulumi CLI gave visibility with preview, diff, and up actions.
- I used Pulumi Copilot and Docs to troubleshoot resource schema mismatches.
Notable Resources Used:
aws:s3:BucketV2
aws:s3:BucketWebsiteConfigurationV2
aws:s3:BucketPolicy
aws:cloudfront:Distribution
synced-folder:index:S3BucketFolder
Pulumi Copilot Prompt Example:
“How do I configure BucketWebsiteConfigurationV2 with index and error document in YAML?”
Thanks for reading! Feel free to fork the repo and launch your own docs site. The deployment takes less than 5 minutes!