This project contains a lambda that integrates the Switchboard API with PagerDuty to automatically create a room during a PagerDuty incident. This README contains developement and deployment instructions. For more detailed Switchboard API documentation you can visit the Switchboard Developer Docs.
- Run
npm install -g serverless
to install serverless globally - Run
nvm use 20
to use NodeJS v20- This project may run fine with earlier versions of NodeJS, but it hasn't been fully tested
- Run
cp sample.env .env
to copy thedotenv
template- Edit
.env
to replace the placeholder values with your API keys
- Edit
Depending on your preferred package manager, follow the instructions below to deploy your project.
- Run
npm i
to install the project dependencies - Run
npx sls deploy
to deploy this stack to AWS
- Run
yarn
to install the project dependencies - Run
yarn sls deploy
to deploy this stack to AWS
This lambda, upon receipt of a PagerDuty webhook incident event, will create a room and paste the link as a note in the incident. If you want to modify this behavior you can change the code in src/functions/pagerduty-webhook/handler.ts
.
- Run
yarn serverless offline
- You will see the endpoint printed in the console. You can
curl
this endpoint, or use Ngrok to forward PagerDuty traffic from your integration to your local environment.
- You will see the endpoint printed in the console. You can