Infrastructure, containers, and serverless apps to AWS, Azure, GCP, and Kubernetes... all deployed with Pulumi
Infrastructure, containers, and serverless apps to AWS, Azure, GCP, and Kubernetes... all deployed with Pulumi
Pulumi is open source under the Apache 2.0 license, supports many languages and clouds, and is easy to extend.
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:
aws for Amazon Web Services azure for Microsoft Azuregcp for Google Cloud Platform kubernetes for KubernetesSee the Pulumi documentation for more details on getting started with Pulumi.
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 masterDon't see an example listed? Try Pulumi AI and use natural-language prompts to generate Pulumi infrastructure-as-code programs in any language.
When making changes to examples, either individual or in bulk, it's useful to validate those changes before submitting a pull request. This repository includes a make pr_preview target that provides preview-only sanity checks for changed examples in pull requests. This helps ensure examples remain functional without requiring full deployments.
# Run preview checks on all changed examples
make pr_preview
# Check what examples would be tested without running previews
DRY_LIST=1 make pr_preview
# Use a custom base branch for comparison
BASE_REF=origin/mybranch make pr_previewThe script assumes you have credentials for various providers configured. Examples that fail preview due to missing live resources or complex configuration requirements are expected and don't necessarily indicate problems.
| Example | Description |
|---|---|
| AI App Infrastructure | Deploy a serverless AI inference endpoint backed by an Amazon Bedrock foundation model. |
| 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. |
| Landing Zone | Provision a single-account landing zone - VPC, KMS key, VPC flow logs, deployer and read-only IAM roles, and an encrypted CloudTrail audit trail - that downstream stacks reference. |
| Miniflux | Stand up an RSS Service using Fargate and RDS. |
| Production Observability | Add a baseline observability stack for a Lambda service - log retention, SNS alerting, error and latency alarms, a CloudWatch dashboard, and X-Ray tracing. |
| 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 Folder Component | Serve a static website on S3 using a reusable component. |
| 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. |
| Serverless React + Postgres | Deploy a React SPA on CloudFront with a same-origin Lambda API and a private Aurora Serverless v2 (PostgreSQL) database, layered on the landing-zone example. |
| 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. |
| Query Twitter every 2 minutes, store the results in S3, and set up an Athena table and query. | |
| 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.
| Example | Description |
|---|---|
| API Gateway HTTP API quickstart | Deploy a very simple HTTP API that invokes a Lambda. |
| API Gateway V2 with EventBridge and Lambda | Deploy an HTTP API that uses EventBridge to target a Lambda function. |
| AppSync | Deploy a basic GraphQL endpoint in AWS AppSync. |
| AssumeRole | Use AssumeRole to create resources. |
| Fargate | Provision a full ECS Fargate cluster running a load-balanced nginx web server. |
| Resources | Create various resources, including cloudwatch.Dashboard, cloudwatch.EventRule, cloudwatch.LogGroup, and sqs.Queue. |
| S3 Folder | Serve a static website on S3. |
| Stack Reference | Create a "team" EC2 Instance with tags set from upstream stacks. |
| Step Functions | Use Step Functions with a Lambda function. |
| 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.
| 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.
| Example | Description |
|---|---|
| AssumeRole | Use AssumeRole to create resources. |
| Fargate | Bui |
No open issues yet, or sync has not completed.