# Incident Response as Code: Managing PagerDuty with Pulumi

DevFeed: [Incident Response as Code: Managing PagerDuty with Pulumi](<https://devfeed.tech/articles/incident-response-as-code-managing-pagerduty-with-pulumi-19006.md>)

Original publisher: [Read original article](<https://www.pulumi.com/blog/incident-response-as-code-pagerduty-pulumi/>)

Author: Engin Diri

Published: 2026-07-20T00:00:00Z

Content type: tutorial

Language: en

Sources: [Pulumi](<https://devfeed.tech/sources/pulumi.md>)

Topics: [pulumi](<https://devfeed.tech/topics/pulumi.md>), [Incident response](<https://devfeed.tech/topics/incident-response.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [TypeScript](<https://devfeed.tech/topics/typescript.md>), [Amazon Simple Queue Service (SQS)](<https://devfeed.tech/topics/amazon-simple-queue-service-sqs.md>)

Tags: [aws](<https://devfeed.tech/tags/aws.md>), [devops](<https://devfeed.tech/tags/devops.md>), [incident](<https://devfeed.tech/tags/incident.md>), [incident-response](<https://devfeed.tech/tags/incident-response.md>), [infrastructure-as-code](<https://devfeed.tech/tags/infrastructure-as-code.md>), [pagerduty](<https://devfeed.tech/tags/pagerduty.md>), [pulumi](<https://devfeed.tech/tags/pulumi.md>), [sqs](<https://devfeed.tech/tags/sqs.md>), [tutorials](<https://devfeed.tech/tags/tutorials.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

## AI overview

A tutorial for managing PagerDuty incident-response resources and AWS alarm wiring together in a Pulumi program. The demo uses TypeScript to define an on-call team, escalation policy, PagerDuty service, SQS dead-letter queue, CloudWatch alarm, and SNS forwarding.

## Source excerpt

You usually find out in the postmortem: the alarm fired, but it paged a schedule nobody was on anymore. Or the service had been running in production for three months before anyone created the matching PagerDuty service, so the first person to notice the outage was a customer. The infrastructure was code, reviewed and versioned. The incident response setup was forty clicks in a web UI, done once, by someone who has since changed teams. PagerDuty's own engineering team has been making the case for managing PagerDuty as code for years, and the OneUptime folks recently published a hands-on guide to the PagerDuty Terraform provider that walks the whole resource catalog. I liked both posts, and you probably know where this is going: I want the same thing in TypeScript, with the on-call setup and the infrastructure it protects living in the same Pulumi program. Teams, schedules, escalation policies, services, and the CloudWatch alarm that pages you: one pulumi up. What you are building The demo models a small platform team that owns a checkout service on AWS. On the PagerDuty side: a team with three members, a weekly on-call rotation, an escalation policy with two levels, and a service with a CloudWatch integration. On the AWS side: a dead-letter queue, an alarm that fires when a message lands in it, and an SNS topic that forwards the alarm to PagerDuty. The interesting part is where the two meet: the integration key PagerDuty mints flows straight into the SNS subscription without ever touching a clipboard. flowchart LR DLQ["SQS dead-letter queue"] --> Alarm["CloudWatch alarm"] Alarm --> SNS["SNS topic"] SNS -->|"HTTPS subscription
with integration key"| Int["CloudWatch integration"] Int --> Svc["PagerDuty service
Checkout API"] Svc --> EP["Escalation policy"] EP -->|"level 1"| Sched["Weekly rotation
Lena, Jonas, Mia"] EP -->|"level 2, after 15 min"| Lead["Team lead"] Everything on both sides of that diagram is one TypeScript program. If you would rather write