← All insightsIntegration

How to use Pulumi with Amazon Web Services

Nir Geier, CodeWizard · 16 April 2025 · 3 min read · Intermediate

Pulumi and Amazon Web Services are a common pairing in a modern DevOps stack. Here is how they fit together and a practical way to wire them up.

Where Pulumi fits

Pulumi lets you define cloud infrastructure using general-purpose languages (TypeScript, Python, Go, C#), bringing loops, functions, tests and IDE support to IaC while keeping a Terraform-like plan/apply model.

typescript
import * as aws from "@pulumi/aws";

const assets = new aws.s3.BucketV2("assets", {
  bucket: "acme-assets",
  tags: { Environment: "prod" },
});

export const bucketName = assets.bucket;

Where Amazon Web Services fits

AWS is a broad public cloud spanning compute (EC2, ECS, EKS, Lambda), storage (S3, EBS), networking (VPC) and hundreds of managed services - best operated declaratively with IaC and least-privilege IAM.

hcl
data "aws_iam_policy_document" "read_assets" {
  statement {
    actions   = ["s3:GetObject"]
    resources = ["arn:aws:s3:::acme-assets/*"]
  }
}
resource "aws_iam_policy" "read_assets" {
  name   = "read-assets"
  policy = data.aws_iam_policy_document.read_assets.json
}

Making them work together

  • Keep programs declarative; push logic into tested helpers
  • Use pulumi config set --secret for encrypted config
  • Use SSO for humans and OIDC roles for CI - no static keys
  • Write least-privilege IAM and manage everything via IaC

Want this pairing set up properly, with docs and handover? That is exactly the kind of work CodeWizard's embedded senior engineers do - and both Pulumi and Amazon Web Services have active community groups you can join for free.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult