Static Website Factory
An API that programmatically generates and deploys static websites using the Automation API.
Overview
A Static Website Factory is a specific implementation of a self-service platform, focused on deploying static websites. It typically exposes a REST API where a user can POST content (e.g., HTML or Markdown). The backend service takes this request, uses the Pulumi Automation API to create a new stack, and runs an inline Pulumi program that provisions an object storage bucket (like AWS S3 or Azure Blob Storage), configures it for web hosting, and uploads the user's content. The service then returns the public URL of the newly created site.
✨ Key Features
- RESTful API for creating, updating, and deleting websites.
- Dynamically creates a new Pulumi stack per website.
- Uses inline Pulumi programs to define infrastructure on the fly.
- Provisions cloud storage (S3, Blob Storage) and configures it for static hosting.
- Returns the public URL of the deployed site as an output.
🎯 Key Differentiators
- Provides full programmatic control over the underlying infrastructure.
- Can be extended to provision any other cloud resources alongside the website.
- Can be self-hosted and fully customized.
Unique Value: Automates the entire lifecycle of static site hosting, from provisioning resources to deploying content, all through a simple API.
🎯 Use Cases (4)
✅ Best For
- Pulumi has created multiple examples of this pattern, including a SvelteKit application that exposes a UI for creating sites and a Lambda-based API that generates sites from a POST request.
💡 Check With Vendor
Verify these considerations match your specific requirements:
- Deploying dynamic, server-side rendered applications.
- Managing a small number of sites where manual deployment is simple.
🏆 Alternatives
While platforms like Netlify are more feature-rich out of the box, building a static site factory with the Automation API provides ultimate flexibility and control, allowing you to integrate it seamlessly into your own infrastructure and workflows.
💻 Platforms
🔌 Integrations
💰 Pricing
Free tier: This is an example pattern/open-source project. Cost is based on the underlying cloud resources used.
🔄 Similar Tools in Pulumi Automation API
Pulumi
An open-source infrastructure-as-code platform for creating, deploying, and managing cloud infrastru...
Pulumi Kubernetes Operator
A Kubernetes controller that manages Pulumi stacks as custom resources, enabling GitOps workflows fo...
Self-Service Infrastructure Platform
An internal tool, often a web portal or CLI, that uses the Automation API to expose standardized inf...
Infrastructure Integration Testing Framework
Using Automation API within a testing framework (like Pytest or Mocha) to programmatically manage in...
Custom Infrastructure CLI
A custom CLI tool that wraps Pulumi operations to provide a user-friendly, domain-specific interface...
Multi-Stack Orchestration Engine
A custom application that uses the Automation API to coordinate complex workflows involving several ...