Skip to content

AWS.SSMIncidents reference

Source: src/AWS/SSMIncidents/BatchGetIncidentFindings.ts

Runtime binding for ssm-incidents:BatchGetIncidentFindings.

Returns the details of the findings correlated with an incident — the CodeDeploy deployment or CloudFormation stack update suspected of causing it. Findings live under runtime incident-record ARNs, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.BatchGetIncidentFindingsHttp).

// init
const batchGetIncidentFindings = yield* AWS.SSMIncidents.BatchGetIncidentFindings();
// runtime
const { findings } = yield* batchGetIncidentFindings({
incidentRecordArn,
findingIds,
});

Source: src/AWS/SSMIncidents/CreateTimelineEvent.ts

Runtime binding for ssm-incidents:CreateTimelineEvent.

Adds a custom event to an incident’s timeline — automation can annotate the incident as it works (diagnosis steps, mitigation actions, links). Timeline events live under runtime incident-record ARNs, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.CreateTimelineEventHttp).

// init
const createTimelineEvent = yield* AWS.SSMIncidents.CreateTimelineEvent();
// runtime
const { eventId } = yield* createTimelineEvent({
incidentRecordArn,
eventTime: new Date(),
eventType: "Custom Event",
eventData: JSON.stringify({ note: "traffic shifted to us-west-2" }),
});

Source: src/AWS/SSMIncidents/DeleteIncidentRecord.ts

Runtime binding for ssm-incidents:DeleteIncidentRecord.

Deletes an incident record (idempotent — deleting a record that does not exist succeeds). Incident-record ARNs only exist at runtime, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.DeleteIncidentRecordHttp).

DeleteIncidentRecord: Updating Incident Records

Section titled “DeleteIncidentRecord: Updating Incident Records”
// init
const deleteIncidentRecord = yield* AWS.SSMIncidents.DeleteIncidentRecord();
// runtime
yield* deleteIncidentRecord({ arn: incidentRecordArn });

Source: src/AWS/SSMIncidents/DeleteTimelineEvent.ts

Runtime binding for ssm-incidents:DeleteTimelineEvent.

Deletes a custom timeline event from an incident (idempotent — deleting an event that does not exist succeeds). Timeline events live under runtime incident-record ARNs, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.DeleteTimelineEventHttp).

// init
const deleteTimelineEvent = yield* AWS.SSMIncidents.DeleteTimelineEvent();
// runtime
yield* deleteTimelineEvent({ incidentRecordArn, eventId });

Source: src/AWS/SSMIncidents/GetIncidentRecord.ts

Runtime binding for ssm-incidents:GetIncidentRecord.

Returns the details of an incident record — title, impact, status, chat channel, and notification targets. Incident-record ARNs only exist at runtime, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.GetIncidentRecordHttp).

GetIncidentRecord: Reading Incident Records

Section titled “GetIncidentRecord: Reading Incident Records”
// init
const getIncidentRecord = yield* AWS.SSMIncidents.GetIncidentRecord();
// runtime
const { incidentRecord } = yield* getIncidentRecord({ arn: incidentRecordArn });

Source: src/AWS/SSMIncidents/GetTimelineEvent.ts

Runtime binding for ssm-incidents:GetTimelineEvent.

Returns one timeline event of an incident by event id. Timeline events live under runtime incident-record ARNs, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.GetTimelineEventHttp).

// init
const getTimelineEvent = yield* AWS.SSMIncidents.GetTimelineEvent();
// runtime
const { event } = yield* getTimelineEvent({ incidentRecordArn, eventId });

Source: src/AWS/SSMIncidents/ListIncidentFindings.ts

Runtime binding for ssm-incidents:ListIncidentFindings.

Lists the findings (CodeDeploy deployments and CloudFormation stack updates around the incident’s start time) that Incident Manager correlated with an incident. Findings live under runtime incident-record ARNs, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.ListIncidentFindingsHttp).

// init
const listIncidentFindings = yield* AWS.SSMIncidents.ListIncidentFindings();
// runtime
const { findings } = yield* listIncidentFindings({ incidentRecordArn });

Source: src/AWS/SSMIncidents/ListIncidentRecords.ts

Runtime binding for ssm-incidents:ListIncidentRecords.

Lists the incident records in the account — the incidents started from any response plan. Incident records are runtime entities (their ARNs embed the response-plan name and a UUID that only exist once an incident starts), so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.ListIncidentRecordsHttp).

ListIncidentRecords: Reading Incident Records

Section titled “ListIncidentRecords: Reading Incident Records”
// init
const listIncidentRecords = yield* AWS.SSMIncidents.ListIncidentRecords();
// runtime
const { incidentRecordSummaries } = yield* listIncidentRecords({
filters: [{ key: "status", condition: { equals: { stringValues: ["OPEN"] } } }],
});

Source: src/AWS/SSMIncidents/ListRelatedItems.ts

Runtime binding for ssm-incidents:ListRelatedItems.

Lists the related items of an incident — attached metrics, runbook executions, parent tickets, and links. Related items live under runtime incident-record ARNs, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.ListRelatedItemsHttp).

// init
const listRelatedItems = yield* AWS.SSMIncidents.ListRelatedItems();
// runtime
const { relatedItems } = yield* listRelatedItems({ incidentRecordArn });

Source: src/AWS/SSMIncidents/ListTimelineEvents.ts

Runtime binding for ssm-incidents:ListTimelineEvents.

Lists the timeline events of an incident, with optional filters and sorting. Timeline events live under runtime incident-record ARNs, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.ListTimelineEventsHttp).

// init
const listTimelineEvents = yield* AWS.SSMIncidents.ListTimelineEvents();
// runtime
const { eventSummaries } = yield* listTimelineEvents({
incidentRecordArn,
sortBy: "EVENT_TIME",
sortOrder: "DESCENDING",
});

Source: src/AWS/SSMIncidents/ReplicationSet.ts

The Incident Manager replication set — the account/region singleton that onboards AWS Systems Manager Incident Manager. Creating it replicates and encrypts Incident Manager data (response plans, incidents, contacts) to the configured Regions; deleting it offboards Incident Manager and removes all Incident Manager data account-wide.

Only one replication set can exist per account, so this is a capture-and-restore singleton: adopting a pre-existing replication set that Alchemy did not create requires --adopt.

ReplicationSet: Onboarding Incident Manager

Section titled “ReplicationSet: Onboarding Incident Manager”

Replication set in the current Region

const replicationSet = yield* SSMIncidents.ReplicationSet("Incidents", {});

Multi-Region replication with a KMS key

const replicationSet = yield* SSMIncidents.ReplicationSet("Incidents", {
regions: {
"us-east-1": {},
"us-west-2": { sseKmsKeyId: key.keyArn },
},
deletionProtected: true,
});

Source: src/AWS/SSMIncidents/ResponsePlan.ts

An Incident Manager response plan — the template that automates the initial response to incidents by engaging contacts, starting chat-channel collaboration, and running Automation runbooks.

Requires the account’s Incident Manager replication set (SSMIncidents.ReplicationSet) to exist.

Minimal response plan

const replicationSet = yield* SSMIncidents.ReplicationSet("Incidents", {});
const plan = yield* SSMIncidents.ResponsePlan("Critical", {
incidentTemplate: { title: "Critical failure", impact: 1 },
});

Response plan with engagements and chat channel

const plan = yield* SSMIncidents.ResponsePlan("Sev1", {
displayName: "Severity 1 response",
incidentTemplate: {
title: "Sev1 incident",
impact: 1,
summary: "Automated Sev1 response",
notificationTargets: [{ snsTopicArn: topic.topicArn }],
},
engagements: [oncall.contactArn],
chatChannel: { chatbotSns: [topic.topicArn] },
});

Source: src/AWS/SSMIncidents/StartIncident.ts

Runtime binding for ssm-incidents:StartIncident.

Starts an incident from the bound ResponsePlan — Incident Manager creates the incident record, engages the plan’s contacts, posts to its chat channel, and runs its Automation runbooks. The response plan ARN is injected from the binding; pass triggerDetails to record what fired the incident. Provide the implementation with Effect.provide(AWS.SSMIncidents.StartIncidentHttp).

// init — bind the operation to the response plan
const startIncident = yield* AWS.SSMIncidents.StartIncident(plan);
// runtime
const { incidentRecordArn } = yield* startIncident({
title: "checkout p99 breach",
impact: 2,
triggerDetails: {
source: "custom.checkout-monitor",
timestamp: new Date(),
},
});

Source: src/AWS/SSMIncidents/UpdateIncidentRecord.ts

Runtime binding for ssm-incidents:UpdateIncidentRecord.

Updates the details of an incident record — retitle, change impact, or resolve the incident by setting status: "RESOLVED". Incident-record ARNs only exist at runtime, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.UpdateIncidentRecordHttp).

UpdateIncidentRecord: Updating Incident Records

Section titled “UpdateIncidentRecord: Updating Incident Records”
// init
const updateIncidentRecord = yield* AWS.SSMIncidents.UpdateIncidentRecord();
// runtime
yield* updateIncidentRecord({ arn: incidentRecordArn, status: "RESOLVED" });

Source: src/AWS/SSMIncidents/UpdateRelatedItems.ts

Runtime binding for ssm-incidents:UpdateRelatedItems.

Attaches or removes a related item on an incident — link the dashboard, ticket, or runbook execution your automation is working from. Related items live under runtime incident-record ARNs, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.UpdateRelatedItemsHttp).

// init
const updateRelatedItems = yield* AWS.SSMIncidents.UpdateRelatedItems();
// runtime
yield* updateRelatedItems({
incidentRecordArn,
relatedItemsUpdate: {
itemToAdd: {
title: "Grafana dashboard",
identifier: { type: "OTHER", value: { url: "https://grafana.example.com/d/abc" } },
},
},
});

Source: src/AWS/SSMIncidents/UpdateTimelineEvent.ts

Runtime binding for ssm-incidents:UpdateTimelineEvent.

Updates a timeline event’s time, type, data, or references. Timeline events live under runtime incident-record ARNs, so the deploy-time grant is account-level (Resource: "*"). Provide the implementation with Effect.provide(AWS.SSMIncidents.UpdateTimelineEventHttp).

// init
const updateTimelineEvent = yield* AWS.SSMIncidents.UpdateTimelineEvent();
// runtime
yield* updateTimelineEvent({
incidentRecordArn,
eventId,
eventData: JSON.stringify({ note: "mitigation confirmed" }),
});