
Pulumi is the easiest way to build and deploy infrastructure, for any architecture and on any cloud, using programming languages that you already know and love. Code and ship infrastructure faster with your favorite languages and tools, and embed IaC anywhere with Automation API.
Pulumi is open source under the Apache 2.0 license, supports many languages and clouds, and is easy to extend.
Table of contents
About the Pulumi Examples Repo

This repository contains examples of using Pulumi to build and deploy cloud applications and infrastructure across major programming languages.
Each example has a two-part prefix, <cloud>-<language>
, to indicate which <cloud>
and <language>
it pertains to. For example, <cloud>
could be:
See the Pulumi documentation for more details on getting started with Pulumi.
Checking out a single example
You can checkout only the example(s) you want by using a sparse checkout. The following commands show how checkout only the aws-go-fargate
example. Replace aws-go-fargate
with your example of interest.
$ mkdir examples && cd examples
$ git init
$ git remote add origin -f https://github.com/pulumi/examples/
$ git config core.sparseCheckout true
$ echo "aws-go-fargate" >> .git/info/sparse-checkout ## update this
$ git pull origin master
Don't see an example listed? Try Pulumi AI and use natural-language prompts to generate Pulumi infrastructure-as-code programs in any language.
All Pulumi examples
AWS
TypeScript
π Back to the list
Example |
Description |
API Gateway |
Deploy a simple REST API that counts the number of times a route has been hit. |
API Gateway HTTP API with routes |
Deploy a HTTP API that invokes a Lambda. |
API Gateway HTTP API quickstart |
Deploy a very simple HTTP API that invokes a Lambda. |
API Gateway V1 with EventBridge and Lambda |
Deploy a REST API that uses EventBridge to target a Lambda function. Includes API Gateway model validation and custom integration-response mapping. |
API Gateway V2 with EventBridge and Lambda |
Deploy an HTTP API that uses EventBridge to target a Lambda function. |
Apigateway - Auth0 |
Deploy a simple REST API protected by Auth0. |
AppSync |
Deploy a basic GraphQL endpoint in AWS AppSync. |
AssumeRole |
Use AssumeRole to create resources. |
Containers |
Provision containers on Fargate. |
EKS - Dashboard |
Deploy an EKS Kubernetes cluster with an EBS-backed StorageClass, then the Kubernetes Dashboard into the cluster. |
EKS - Hello World |
Deploy an EKS Kubernetes cluster with an EBS-backed StorageClass, then a Kubernetes namespace and nginx deployment into the cluster. |
EKS - Migrate Node Groups |
Create an EKS cluster and node group to use for workload migration with zero downtime. |
Fargate |
Build, deploy, and run a Dockerized app using ECS, ECR, and Fargate. |
Lambda Thumbnailer |
Create a video thumbnail extractor using serverless functions. |
Miniflux |
Stand up an RSS Service using Fargate and RDS. |
Pulumi Webhooks |
Create a Pulumi cloud.HttpEndpoint that receives webhook events delivered by Pulumi Cloud, then echos the event to Slack. |
RDS and Airflow |
Deploy a RDS Postgres instance and containerized Airflow. |
Resources |
Create various resources, including cloudwatch.Dashboard , cloudwatch.EventRule , cloudwatch.LogGroup , and sqs.Queue . |
Ruby on Rails |
Create a single EC2 virtual machine instance with a local MySQL database. |
S3 Lambda |
Set up two AWS S3 Buckets and a single Lambda that listens to one and, upon each new object arriving in it, zips it up and copies it to the second bucket. |
Serverless Application |
Deploy a complete serverless C# application using raw resources from @pulumi/aws . |
Serverless Datawarehouse |
Deploy a serverless data warehouse. |
Slackbot |
Create a simple slackbot that posts a notification to a specific channel any time you're @mentioned anywhere. |
Stack Reference |
Create a "team" EC2 Instance with tags set from upstream stacks. |
Static Website |
Serve a static website using S3, CloudFront, Route53, and Certificate Manager. |
Step Functions |
Use Step Functions with a Lambda function. |
Thumbnailer |
Create a video thumbnail extractor using serverless functions and containers. |
Twitter |
Query Twitter every 2 minutes, store the results in S3, and set up an Athena table and query. |
URL Shortener |
Create a serverless URL shortener that uses high-level components. |
Voting App |
Create a simple voting app using Redis and Python Flask. |
Web Server |
Deploy an EC2 Virtual machine using TypeScript to run a Python web server. |
Web Server with Manual Provisioning |
Use Pulumi dynamic providers to accomplish post-provisioning configuration steps. |
LangServe - Hello OpenAI |
Deploy a LangServe app that uses OpenAI's on AWS ECS. |
Use Pulumi AI to build a new example in any language.
JavaScript
π Back to the list
Use Pulumi AI to build a new example in any language.
Python
π Back to the list
Use Pulumi AI to build a new example in any language.
Go
π Back to the list
Example |
Description |
AssumeRole |
Use AssumeRole to create resources. |
Fargate |
Provision a full ECS Fargate cluster running a load-balanced nginx web server. |
Lambda |
Create a lambda that does a simple ToUpper on the string input and returns it. |
S3 Folder |
Serve a static website on S3. |
Web Server |
Deploy an EC2 Virtual machine running a Python web server. |
LangServe - Hello OpenAI |
Deploy a LangServe app that uses OpenAI's on AWS ECS. |
Use Pulumi AI to build a new example in any language.
C#
π Back to the list
Example |
Description |
AssumeRole |
Use AssumeRole to create resources. |
Fargate |
Build, deploy, and run a Dockerized app using ECS, ECR, and Fargate. |
Lambda |
Create a lambda that does a simple ToUpper on the string input and returns it. |
S3 Folder |
Serve a static website on S3. |
Web Server |
Deploy an EC2 instance and open port 80. |
LangServe - Hello OpenAI |
Deploy a LangServe app that uses OpenAI's on AWS ECS. |
Use Pulumi AI to build a new example in any language.
F#
π Back to the list
Example |
Description |
Lambda Web Server |
Create a web server in AWS lambda using the Giraffe web server. |
S3 Folder |
Serve a static website on S3. |
Use Pulumi AI to build a new example in any language.
Azure
TypeScript
π Back to the list
Use Pulumi AI to build a new example in any language.
Python
π Back to the list
Use Pulumi AI to build a new example in any language.
Go
π Back to the list
Use Pulumi AI to build a new example in any language.
C#
π Back to the list
Use Pulumi AI to build a new example in any language.
GCP
TypeScript
π Back to the list
Example |
Description |
Cloud Run |
Deploy a custom Docker image into Google Cloud Run service. |
Functions - Raw |
Deploy two Google Cloud Functions implemented in Python and Go. |
Functions |
Deploy an HTTP Google Cloud Function endpoint. |
GKE - Hello World |
Deploy a GKE cluster, then a Kubernetes namespace and nginx deployment into the cluster. |
GKE |
Provision a Google Kubernetes Engine (GKE) cluster, then a Kubernetes Deployment. |
Ruby on Rails |
Deliver a containerized Ruby on Rails application. |
Slackbot |
Create a simple slackbot that posts a notification to a specific channel any time you're @mentioned anywhere. |
Use Pulumi AI to build a new example in any language.
JavaScript
π Back to the list
Example |
Description |
Web Server |
Build a web server in Google Cloud. |
Use Pulumi AI to build a new example in any language.
Python
π Back to the list
Example |
Description |
Functions - Raw |
Deploy two Google Cloud Functions implemented in Python and Go. |
Functions |
Deploy a Python-based Google Cloud Function. |
GKE |
Provision a Google Kubernetes Engine (GKE) cluster, then a Kubernetes Deployment. |
Network Component |
Use a reusable component to create a Google Cloud Network and instance. |
nginx Server |
Build a nginx server in Google Cloud. |
Use Pulumi AI to build a new example in any language.
Go
π Back to the list
Example |
Description |
Functions |
Deploy a Go-based Google Cloud Function. |
Functions - Raw |
Deploy a Google Cloud Function implemented in Python. |
Web Server |
Build a web server in Google Cloud. |
Use Pulumi AI to build a new example in any language.
C#
π Back to the list
Example |
Description |
Functions - Raw |
Deploy a Google Cloud Function implemented in Python. |
Functions |
Deploy a Go-based Google Cloud Function. |
Use Pulumi AI to build a new example in any language.
Kubernetes
TypeScript
π Back to the list
Example |
Description |
App Rollout via ConfigMap |
Enable a change in a ConfigMap to trigger a rollout of an nginx Deployment. |
App Rollout via S3 Data Change |
Enable a change in data in S3 to trigger a rollout of an nginx deployment. |
Expose Deployment |
Deploy nginx to a Kubernetes cluster, and publicly explose it using a Kubernetes Service. |
Guestbook |
Build and deploy a simple, multi-tier web application using Kubernetes and Docker. |
Jenkins |
Deploy a container running the Jenkins continuous integration system onto a running Kubernetes cluster. |
Multicloud |
Create managed Kubernetes clusters using AKS, EKS, and GKE, and deploy the application on each cluster. |
nginx server |
Deploy a replicated nginx server to a Kubernetes cluster, using TypeScript and no YAML. |
Sock Shop |
Deploy a version of the standard Sock Shop microservices reference app. |
Staged App Rollout |
Create a staged rollout gated by checking that the P90 response time reported by Prometheus is less than some amount. |
Wordpress Helm Chart |
Use the Helm API to deploy v2.1.3 of the Wordpress Helm Chart to a Kubernetes cluster. |
Use Pulumi AI to build a new example in any language.
Python
π Back to the list
Example |
Description |
Guestbook |
Build and deploy a simple, multi-tier web application using Kubernetes and Docker. |
Use Pulumi AI to build a new example in any language.
C#
π Back to the list
Example |
Description |
Guestbook |
Build and deploy a simple, multi-tier web application using Kubernetes and Docker. |
Use Pulumi AI to build a new example in any language.
Go
π Back to the list
Example |
Description |
Guestbook |
Build and deploy a simple, multi-tier web application using Kubernetes and Docker. |
App Rollout via ConfigMap |
Enable a change in a ConfigMap to trigger a rollout of an nginx Deployment. |
Wordpress Helm Chart |
Use the Helm API to deploy v9.6.0 of the Wordpress Helm Chart to a Kubernetes cluster. |
Expose Deployment |
Deploy nginx to a Kubernetes cluster, and publicly expose it using a Kubernetes Service. |
Use Pulumi AI to build a new example in any language.
Openstack
Python
π Back to the list
Web Server | Deploy an Openstack instance and open port 8000.
Use Pulumi AI to build a new example in any language.
OVHCloud
Go
Example |
Description |
Kubernetes |
A sample to deploy a managed Kubernetes cluster on OVHcloud |
Use Pulumi AI to build a new example in any language.
Cloud
TypeScript
π Back to the list
Example |
Description |
URL Shortener - Cache and HttpServer |
Create a simple URL shortener SPA that uses the high-level cloud.Table and cloud.HttpServer components. |
URL Shortener - Cache |
Create a simple URL shortener SPA that uses the high-level cloud.Table and cloud.API components. |
URL Shortener |
Create a complete URL shortener web application that uses the high-level cloud.Table and cloud.HttpServer components. |
Voting App |
Create a simple voting app using Redis and Python Flask. |
Use Pulumi AI to build a new example in any language.
JavaScript
π Back to the list
Example |
Description |
API on AWS |
Create a simple REST API that counts the number of times a route has been hit. |
Containers |
Provision containers on Fargate. |
HttpServer |
Create a simple REST API that counts the number of times a route has been hit. |
Thumbnailer - Machine Learning |
Create a video thumbnail extractor using serverless functions, containers, and AWS Rekognition. |
Thumbnailer |
Create a video thumbnail extractor using serverless functions and containers. |
Twitter |
Query Twitter every 2 minutes, store the results in S3, and set up an Athena table and query. |
Use Pulumi AI to build a new example in any language.
DigitalOcean
TypeScript
π Back to the list
Example |
Description |
Droplets |
Build sample architecture. |
Kubernetes |
Provision a DigitalOcean Kubernetes cluster. |
Use Pulumi AI to build a new example in any language.
Python
π Back to the list
Example |
Description |
Droplets |
Build sample architecture. |
Kubernetes |
Provision a DigitalOcean Kubernetes cluster. |
Use Pulumi AI to build a new example in any language.
C#
π Back to the list
Example |
Description |
Droplets |
Build sample architecture. |
Kubernetes |
Provision a DigitalOcean Kubernetes cluster. |
Use Pulumi AI to build a new example in any language.
Multicloud
TypeScript
π Back to the list
Try Pulumi Copilot and use natural-language prompts to generate Pulumi example programs in any language.
Example |
Description |
Buckets |
Use a single Pulumi program to provision resources in both AWS and GCP. |
Use Pulumi AI to build a new example in any language.
F5
TypeScript
π Back to the list
Use Pulumi AI to build a new example in any language.
Twilio
TypeScript
π Back to the list
Example |
Description |
Component |
Create a custom Component Resource to parse incoming messages from Twilio. |
Use Pulumi AI to build a new example in any language.
Linode
JavaScript
π Back to the list
Example |
Description |
Web Server |
Build a web server on Linode. |
Use Pulumi AI to build a new example in any language.
Testing
π Back to the list
Use Pulumi AI to build a new example in any language.
Automation API
π Back to the list
Automation API Examples
Engage with our community to elevate your developer experience:
- Join our online Pulumi Community on Slack - Interact with thousands of Pulumi developers for collaborative problem-solving and knowledge-sharing!
- Join a Local Pulumi User Groups (PUGs)- Attend tech-packed meetups and hands-on virtual or in-person workshops.
- Follow @PulumiCorp on X (Twitter) - Get real-time updates, technical insights, and sneak peeks into the latest features.
- Subscribe to our YouTube Channel, PulumiTV - Learn about AI / ML essentials, launches, workshops, demos and more.
- Follow our LinkedIn - Uncover company news, achievements, and behind-the-scenes glimpses.
Contributors
Meet the brilliant minds behind this project, view their profiles, and learn about their valuable contributions.
Want to contribute an example? Please visit our CONTRIBUTING doc for details.
Pulumi developer resources
Delve deeper into our project with additional resources:
- Get Started with Pulumi: Deploy a simple application in AWS, Azure, Google Cloud, or Kubernetes using Pulumi.
- Documentation: Learn about Pulumi concepts, follow user guides, and consult the reference documentation.
- Pulumi Blog - Stay in the loop with our latest tech announcements, insightful articles, and updates.
- Registry: Search for packages and learn about the supported resources you need. Install the package directly into your project, browse the API documentation, and start building.
- Try Pulumi AI - Use natural-language prompts to generate Pulumi infrastructure-as-code programs in any language.
Pulumi roadmap
Review the planned work for the upcoming quarter and a selected backlog of issues that are on our mind but not yet scheduled on the Pulumi Roadmap.