get_service_health
Monitor AWS service health by retrieving recent operational events from the AWS Health Dashboard to identify potential issues affecting your cloud infrastructure.
Instructions
Lists recent open events from AWS Health Dashboard.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1905-1923 (handler)Handler function that executes the tool logic: queries AWS Health API for open and upcoming events using DescribeEventsCommand and returns formatted JSON response.if (name === "get_service_health") { const command = new DescribeEventsCommand({ filter: { eventStatusCodes: ["open", "upcoming"] } }); const response = await healthClient.send(command); const events = response.events?.map(e => ({ EventTypeCode: e.eventTypeCode, Service: e.service, Region: e.region, StartTime: e.startTime, Status: e.statusCode, Description: e.eventScopeCode })) || []; return { content: [{ type: "text", text: JSON.stringify(events, null, 2) }] }; }
- src/index.ts:550-556 (registration)Tool registration in the ListTools handler, defining name, description, and input schema (no parameters required).name: "get_service_health", description: "Lists recent open events from AWS Health Dashboard.", inputSchema: { type: "object", properties: {} } },
- src/index.ts:61-61 (helper)Initialization of the AWS HealthClient instance used exclusively by the get_service_health tool handler.const healthClient = new HealthClient({ region: "us-east-1" }); // AWS Health API is global (us-east-1)
- src/index.ts:27-27 (helper)Import of AWS SDK HealthClient and DescribeEventsCommand used in the tool implementation.import { HealthClient, DescribeEventsCommand } from "@aws-sdk/client-health";