ec2-instance-running-scheduler 0.2.7 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.jsii CHANGED
@@ -8435,7 +8435,7 @@
8435
8435
  }
8436
8436
  }
8437
8437
  },
8438
- "description": "AWS CDK construct library that starts and stops EC2 instances on a cron schedule using EventBridge Scheduler and a Durable Execution Lambda. The handler discovers instances with the Resource Groups Tagging API, issues start/stop, polls until each instance reaches a stable target state (durable step / wait), processes multiple instances in parallel (bounded concurrency), and posts Slack summary and per-instance thread messages using a secret from Secrets Manager. The Lambda emits structured application logs alongside JSON platform logs.",
8438
+ "description": "AWS CDK construct library that starts and stops EC2 instances on a cron schedule using EventBridge Scheduler and a Durable Execution Lambda. The handler discovers instances with the Resource Groups Tagging API, issues start/stop, waits until each instance reaches a stable target state (durable step / wait), processes multiple instances in parallel (bounded concurrency), and posts Slack summary and per-instance thread messages using a secret from Secrets Manager. The Lambda emits structured application logs alongside JSON platform logs.",
8439
8439
  "docs": {
8440
8440
  "stability": "stable"
8441
8441
  },
@@ -8461,7 +8461,7 @@
8461
8461
  },
8462
8462
  "name": "ec2-instance-running-scheduler",
8463
8463
  "readme": {
8464
- "markdown": "# EC2 Instance Running Scheduler (AWS CDK v2)\n\n[![GitHub](https://img.shields.io/github/license/gammarers-aws-cdk-constructs/ec2-instance-running-scheduler?style=flat-square)](https://github.com/gammarers-aws-cdk-constructs/ec2-instance-running-scheduler/blob/main/LICENSE)\n[![npm](https://img.shields.io/npm/v/ec2-instance-running-scheduler?style=flat-square)](https://www.npmjs.com/package/ec2-instance-running-scheduler)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/gammarers-aws-cdk-constructs/ec2-instance-running-scheduler/release.yml?branch=main&label=release&style=flat-square)](https://github.com/gammarers-aws-cdk-constructs/ec2-instance-running-scheduler/actions/workflows/release.yml)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gammarers-aws-cdk-constructs/ec2-instance-running-scheduler?sort=semver&style=flat-square)](https://github.com/gammarers-aws-cdk-constructs/ec2-instance-running-scheduler/releases)\n[![View on Construct Hub](https://constructs.dev/badge?package=ec2-instance-running-scheduler)](https://constructs.dev/packages/ec2-instance-running-scheduler)\n\nAWS CDK construct library that starts and stops EC2 instances on a cron schedule using **EventBridge Scheduler** and a **Durable Execution Lambda**. The handler discovers instances with the **Resource Groups Tagging API**, issues start/stop, **polls until each instance reaches a stable target state** (durable `step` / `wait`), processes **multiple instances in parallel** (bounded concurrency), and posts **Slack** summary and per-instance thread messages using a secret from **Secrets Manager**. The Lambda emits **structured application logs** alongside JSON platform logs.\n\n## Features\n\n- **Tag-based targeting** – Select EC2 instances by tag key and values (e.g. `Schedule` / `YES`) via `tag:GetResources`.\n- **EventBridge Scheduler** – Separate cron rules for start and stop, with per-rule timezone (`aws-cdk-lib` `TimeZone`).\n- **Durable Lambda** – One Lambda with AWS Lambda Durable Execution (`step`, `wait`, `map`, child contexts per instance) for long-running workflows without Step Functions.\n- **Stable-state polling** – After start/stop, the function waits (20 seconds between attempts) and re-describes instances until `running` (start mode) or `stopped` (stop mode).\n- **Configurable polling limits** – Per-instance **max loop count** and **max elapsed time** via `resourcePolling` (default: 90 loops / 1800 seconds). Failures use explicit `ResourcePollingFailed:*` messages instead of running until the Durable execution timeout (construct default: 2 hours).\n- **Validated environment variables** – The bundled handler parses required and polling env vars at invocation using strict decimal integer rules; polling limits must be **positive integers** (`> 0`).\n- **Slack notifications** – Parent message plus threaded updates per instance; credentials from Secrets Manager JSON (`token`, `channel`). The construct sets **`SLACK_SECRET_NAME`** on the function.\n- **Structured logging** – Durable execution **`ctx.logger`** for traceable JSON application logs (invocation, describe/start/stop/wait loops, polling limit errors, Slack steps, completion).\n- **Scheduling toggle** – Enable or disable both schedules without removing the stack (`enableScheduling`).\n- **Configurable schedules** – Optional cron overrides for start and stop (`minute`, `hour`, `week`, `timezone`); sensible defaults if omitted.\n- **IAM and observability** – EC2 and tagging API permissions, Slack secret read grant, **Parameters and Secrets Lambda Extension**, JSON logging, and a dedicated log group (construct defaults).\n\n## Installation\n\n**npm**\n\n```bash\nnpm install ec2-instance-running-scheduler\n```\n\n**yarn**\n\n```bash\nyarn add ec2-instance-running-scheduler\n```\n\n**pnpm**\n\n```bash\npnpm add ec2-instance-running-scheduler\n```\n\n## Usage\n\nUse the **construct** `EC2InstanceRunningScheduler` when embedding the scheduler in an existing stack or other CDK scope.\n\n```typescript\nimport * as cdk from 'aws-cdk-lib';\nimport { TimeZone } from 'aws-cdk-lib';\nimport { EC2InstanceRunningScheduler } from 'ec2-instance-running-scheduler';\n\nconst app = new cdk.App();\nconst stack = new cdk.Stack(app, 'MyStack');\n\nnew EC2InstanceRunningScheduler(stack, 'EC2InstanceRunningScheduler', {\n targetResource: {\n tagKey: 'Schedule',\n tagValues: ['YES'],\n },\n secrets: {\n slackSecretName: 'my-slack-secret',\n },\n startSchedule: {\n timezone: TimeZone.ASIA_TOKYO,\n minute: '55',\n hour: '8',\n week: 'MON-FRI',\n },\n stopSchedule: {\n timezone: TimeZone.ASIA_TOKYO,\n minute: '5',\n hour: '19',\n week: 'MON-FRI',\n },\n enableScheduling: true,\n resourcePolling: {\n maxLoopCount: 120,\n maxElapsedSeconds: 3600,\n },\n});\n```\n\nUse the **stack** `EC2InstanceRunningScheduleStack` when deploying the scheduler as its own stack. It accepts the same **targeting, schedules, secrets, and enable flag** as the construct (plus standard `StackProps` such as `env`). For **`resourcePolling`**, use the construct directly or extend the stack in your app.\n\n```typescript\nimport * as cdk from 'aws-cdk-lib';\nimport { TimeZone } from 'aws-cdk-lib';\nimport { EC2InstanceRunningScheduleStack } from 'ec2-instance-running-scheduler';\n\nconst app = new cdk.App();\n\nnew EC2InstanceRunningScheduleStack(app, 'EC2InstanceRunningScheduleStack', {\n targetResource: {\n tagKey: 'Schedule',\n tagValues: ['YES'],\n },\n secrets: {\n slackSecretName: 'my-slack-secret',\n },\n startSchedule: {\n timezone: TimeZone.ASIA_TOKYO,\n minute: '55',\n hour: '8',\n week: 'MON-FRI',\n },\n stopSchedule: {\n timezone: TimeZone.ASIA_TOKYO,\n minute: '5',\n hour: '19',\n week: 'MON-FRI',\n },\n enableScheduling: true,\n});\n```\n\nEventBridge Scheduler invokes the Lambda with `Params.TagKey`, `Params.TagValues`, and `Params.Mode` (`Start` or `Stop`); the construct wires this for you. The function environment includes:\n\n| Variable | Source | Purpose |\n|----------|--------|---------|\n| `SLACK_SECRET_NAME` | `secrets.slackSecretName` | Secrets Manager secret for Slack (required) |\n| `PROCESS_RESOURCE_MAX_LOOP_COUNT` | `resourcePolling.maxLoopCount` (default `90`) | Max describe/poll iterations per instance |\n| `PROCESS_RESOURCE_MAX_ELAPSED_SECONDS` | `resourcePolling.maxElapsedSeconds` (default `1800`) | Max wall-clock seconds polling one instance |\n\nWhen you set polling limits via `resourcePolling`, the construct writes them as decimal integer strings. If you override these variables manually, each value must be a **strict decimal integer** (e.g. `\"120\"` is valid; `\"0x10\"`, `\"3.14\"`, or `\"10abc\"` are rejected) and **greater than zero**. Invalid or missing `SLACK_SECRET_NAME` causes the handler to fail at the start of an invocation.\n\n## Options\n\n### EC2InstanceRunningScheduler\n\n| Option | Type | Required | Description |\n|--------|------|----------|-------------|\n| `targetResource` | `TargetResource` | Yes | Tag key and values used to select EC2 instances. |\n| `secrets` | `Secrets` | Yes | Secrets Manager secret for Slack (`slackSecretName`). |\n| `startSchedule` | `Schedule` | No | Cron for starting instances (default: `50 7 ? * MON-FRI *` in `Etc/UTC`). |\n| `stopSchedule` | `Schedule` | No | Cron for stopping instances (default: `5 19 ? * MON-FRI *` in `Etc/UTC`). |\n| `enableScheduling` | `boolean` | No | Whether both scheduler rules are enabled (default: `true`). |\n| `resourcePolling` | `ResourcePollingLimits` | No | Per-instance polling caps (see below). |\n\n### EC2InstanceRunningScheduleStack\n\nIncludes `targetResource`, `secrets`, `startSchedule`, `stopSchedule`, `enableScheduling`, and standard `StackProps`. Does **not** expose `resourcePolling`; use `EC2InstanceRunningScheduler` when you need custom polling limits.\n\n### TargetResource\n\n- `tagKey` – Tag key used to select instances (e.g. `Schedule`).\n- `tagValues` – Tag values that must match (e.g. `['YES']`).\n\n### Schedule\n\n- `timezone` – `TimeZone` from `aws-cdk-lib` (e.g. `TimeZone.ASIA_TOKYO`, `TimeZone.ETC_UTC`).\n- `minute` – Cron minute (`0`–`59`).\n- `hour` – Cron hour (`0`–`23`).\n- `week` – Cron day-of-week field (e.g. `MON-FRI`).\n\n### Secrets\n\n- `slackSecretName` – Name of the AWS Secrets Manager secret. The Lambda expects JSON with **`token`** (Slack bot token) and **`channel`** (channel ID or name for `chat.postMessage`).\n\n### ResourcePollingLimits\n\nWritten to `PROCESS_RESOURCE_MAX_LOOP_COUNT` and `PROCESS_RESOURCE_MAX_ELAPSED_SECONDS` on the running scheduler Lambda.\n\n- `maxLoopCount` – Maximum describe/poll loop iterations per instance (default: **90**). Must be a positive integer when set.\n- `maxElapsedSeconds` – Maximum wall-clock seconds spent polling one instance (default: **1800**, 30 minutes). Must be a positive integer when set.\n\nWhen a limit is exceeded during polling, the handler throws an error with prefix `ResourcePollingFailed:` (`MaxLoopCountExceeded`, `MaxElapsedTimeExceeded`, or `UnexpectedInstanceState` for unknown EC2 states).\n\n## Requirements\n\n- **Node.js** ≥ 20.0.0 (for developing or synthesizing CDK apps that depend on this package).\n- **aws-cdk-lib** ^2.232.0 and **constructs** ^10.5.1 (peer dependencies).\n- **AWS** – EventBridge Scheduler; Lambda with **Durable Execution** (Node.js **24.x** runtime in the construct; Durable Execution requires a supported Node.js runtime in your region), a **live alias**, **Parameters and Secrets Lambda Extension**; EC2 (`DescribeInstances`, `StartInstances`, `StopInstances`); Resource Groups Tagging API (`tag:GetResources`); Secrets Manager. The deployed function uses **arm64**, Durable Execution IAM policies, a 2-hour Durable execution timeout (construct default), and a bundled handler that loads secrets via **aws-lambda-secret-fetcher**.\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n"
8464
+ "markdown": "# EC2 Instance Running Scheduler (AWS CDK v2)\n\n[![GitHub](https://img.shields.io/github/license/gammarers-aws-cdk-constructs/ec2-instance-running-scheduler?style=flat-square)](https://github.com/gammarers-aws-cdk-constructs/ec2-instance-running-scheduler/blob/main/LICENSE)\n[![npm](https://img.shields.io/npm/v/ec2-instance-running-scheduler?style=flat-square)](https://www.npmjs.com/package/ec2-instance-running-scheduler)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/gammarers-aws-cdk-constructs/ec2-instance-running-scheduler/release.yml?branch=main&label=release&style=flat-square)](https://github.com/gammarers-aws-cdk-constructs/ec2-instance-running-scheduler/actions/workflows/release.yml)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gammarers-aws-cdk-constructs/ec2-instance-running-scheduler?sort=semver&style=flat-square)](https://github.com/gammarers-aws-cdk-constructs/ec2-instance-running-scheduler/releases)\n[![View on Construct Hub](https://constructs.dev/badge?package=ec2-instance-running-scheduler)](https://constructs.dev/packages/ec2-instance-running-scheduler)\n\nAWS CDK construct library that starts and stops EC2 instances on a cron schedule using **EventBridge Scheduler** and a **Durable Execution Lambda**. The handler discovers instances with the **Resource Groups Tagging API**, issues start/stop, **waits until each instance reaches a stable target state** (durable `step` / `wait`), processes **multiple instances in parallel** (bounded concurrency), and posts **Slack** summary and per-instance thread messages using a secret from **Secrets Manager**. The Lambda emits **structured application logs** alongside JSON platform logs.\n\n## Features\n\n- **Tag-based targeting** – Select EC2 instances by tag key and values (e.g. `Schedule` / `YES`) via `tag:GetResources`.\n- **EventBridge Scheduler** – Separate cron rules for start and stop, with per-rule timezone (`aws-cdk-lib` `TimeZone`).\n- **Durable Lambda** – One Lambda with AWS Lambda Durable Execution (`step`, `wait`, `map`, child contexts per instance) for long-running workflows without Step Functions.\n- **Stable-state waiting** – After start/stop, the function waits (20 seconds between attempts) and re-describes instances until `running` (start mode) or `stopped` (stop mode).\n- **Configurable wait limits** – Per-instance **max loop count** and **max elapsed time** via `resourceWait` (default: 90 loops / 1800 seconds). Failures use explicit `ResourceWaitFailed:*` messages instead of running until the Durable execution timeout (construct default: 2 hours).\n- **Validated environment variables** – The bundled handler parses env vars with **strict-env-resolver** (`StrictEnvResolver`). `SLACK_SECRET_NAME` is required; wait limits must be **finite positive numbers** (`> 0`).\n- **Slack notifications** – Parent message plus threaded updates per instance; credentials from Secrets Manager JSON (`token`, `channel`). The construct sets **`SLACK_SECRET_NAME`** on the function.\n- **Structured logging** – Durable execution **`ctx.logger`** for traceable JSON application logs (invocation, describe/start/stop/wait loops, wait limit errors, Slack steps, completion).\n- **Optional failure detection** – CloudWatch alarms and log-based metrics for Lambda errors, instance wait failures (`ResourceWaitFailed`), Slack post failures, and other handler `ERROR` logs. Optional SNS notifications via a caller-supplied topic (`failureDetection.alarmTopic`).\n- **Scheduling toggle** – Enable or disable both schedules without removing the stack (`enableScheduling`).\n- **Configurable schedules** – Optional cron overrides for start and stop (`minute`, `hour`, `week`, `timezone`); sensible defaults if omitted.\n- **IAM and observability** – EC2 and tagging API permissions, Slack secret read grant, **Parameters and Secrets Lambda Extension**, JSON logging, and a dedicated log group (construct defaults).\n\n## Installation\n\n**npm**\n\n```bash\nnpm install ec2-instance-running-scheduler\n```\n\n**yarn**\n\n```bash\nyarn add ec2-instance-running-scheduler\n```\n\n**pnpm**\n\n```bash\npnpm add ec2-instance-running-scheduler\n```\n\n## Usage\n\nUse the **construct** `EC2InstanceRunningScheduler` when embedding the scheduler in an existing stack or other CDK scope.\n\n```typescript\nimport * as cdk from 'aws-cdk-lib';\nimport { TimeZone } from 'aws-cdk-lib';\nimport * as sns from 'aws-cdk-lib/aws-sns';\nimport { EC2InstanceRunningScheduler } from 'ec2-instance-running-scheduler';\n\nconst app = new cdk.App();\nconst stack = new cdk.Stack(app, 'MyStack');\n\nconst alarmTopic = new sns.Topic(stack, 'OpsAlerts');\n\nnew EC2InstanceRunningScheduler(stack, 'EC2InstanceRunningScheduler', {\n targetResource: {\n tagKey: 'Schedule',\n tagValues: ['YES'],\n },\n secrets: {\n slackSecretName: 'my-slack-secret',\n },\n startSchedule: {\n timezone: TimeZone.ASIA_TOKYO,\n minute: '55',\n hour: '8',\n week: 'MON-FRI',\n },\n stopSchedule: {\n timezone: TimeZone.ASIA_TOKYO,\n minute: '5',\n hour: '19',\n week: 'MON-FRI',\n },\n enableScheduling: true,\n resourceWait: {\n maxLoopCount: 120,\n maxElapsedSeconds: 3600,\n },\n failureDetection: {\n enabled: true,\n alarmTopic,\n },\n});\n```\n\nUse the **stack** `EC2InstanceRunningScheduleStack` when deploying the scheduler as its own stack. It accepts the same **targeting, schedules, secrets, enable flag, and failure detection** as the construct (plus standard `StackProps` such as `env`). For **`resourceWait`**, use the construct directly or extend the stack in your app.\n\n```typescript\nimport * as cdk from 'aws-cdk-lib';\nimport { TimeZone } from 'aws-cdk-lib';\nimport * as sns from 'aws-cdk-lib/aws-sns';\nimport { EC2InstanceRunningScheduleStack } from 'ec2-instance-running-scheduler';\n\nconst app = new cdk.App();\n\nconst alarmTopic = sns.Topic.fromTopicArn(\n app,\n 'OpsAlerts',\n 'arn:aws:sns:ap-northeast-1:123456789012:ops-alerts',\n);\n\nnew EC2InstanceRunningScheduleStack(app, 'EC2InstanceRunningScheduleStack', {\n targetResource: {\n tagKey: 'Schedule',\n tagValues: ['YES'],\n },\n secrets: {\n slackSecretName: 'my-slack-secret',\n },\n startSchedule: {\n timezone: TimeZone.ASIA_TOKYO,\n minute: '55',\n hour: '8',\n week: 'MON-FRI',\n },\n stopSchedule: {\n timezone: TimeZone.ASIA_TOKYO,\n minute: '5',\n hour: '19',\n week: 'MON-FRI',\n },\n enableScheduling: true,\n failureDetection: {\n enabled: true,\n alarmTopic,\n },\n});\n```\n\nEventBridge Scheduler invokes the Lambda with `Params.TagKey`, `Params.TagValues`, and `Params.Mode` (`Start` or `Stop`); the construct wires this for you. The function environment includes:\n\n| Variable | Source | Purpose |\n|----------|--------|---------|\n| `SLACK_SECRET_NAME` | `secrets.slackSecretName` | Secrets Manager secret for Slack (required) |\n| `PROCESS_RESOURCE_MAX_LOOP_COUNT` | `resourceWait.maxLoopCount` (default `90`) | Max describe/wait iterations per instance |\n| `PROCESS_RESOURCE_MAX_ELAPSED_SECONDS` | `resourceWait.maxElapsedSeconds` (default `1800`) | Max wall-clock seconds waiting for one instance |\n\nWhen you set wait limits via `resourceWait`, the construct writes them as decimal integer strings. At invocation the handler parses them with **strict-env-resolver**; each value must be a **finite number greater than zero**. Missing `SLACK_SECRET_NAME` or invalid env values cause `StrictEnvValidationError` at the start of an invocation.\n\n## Options\n\n### EC2InstanceRunningScheduler\n\n| Option | Type | Required | Description |\n|--------|------|----------|-------------|\n| `targetResource` | `TargetResource` | Yes | Tag key and values used to select EC2 instances. |\n| `secrets` | `Secrets` | Yes | Secrets Manager secret for Slack (`slackSecretName`). |\n| `startSchedule` | `Schedule` | No | Cron for starting instances (default: `50 7 ? * MON-FRI *` in `Etc/UTC`). |\n| `stopSchedule` | `Schedule` | No | Cron for stopping instances (default: `5 19 ? * MON-FRI *` in `Etc/UTC`). |\n| `enableScheduling` | `boolean` | No | Whether both scheduler rules are enabled (default: `true`). |\n| `resourceWait` | `ResourceWaitLimits` | No | Per-instance wait caps (see below). |\n| `failureDetection` | `FailureDetectionAlarms` | No | Optional CloudWatch alarms and log-based metrics (see below). |\n\n### EC2InstanceRunningScheduleStack\n\nIncludes `targetResource`, `secrets`, `startSchedule`, `stopSchedule`, `enableScheduling`, `failureDetection`, and standard `StackProps`. Does **not** expose `resourceWait`; use `EC2InstanceRunningScheduler` when you need custom wait limits.\n\n### TargetResource\n\n- `tagKey` – Tag key used to select instances (e.g. `Schedule`).\n- `tagValues` – Tag values that must match (e.g. `['YES']`).\n\n### Schedule\n\n- `timezone` – `TimeZone` from `aws-cdk-lib` (e.g. `TimeZone.ASIA_TOKYO`, `TimeZone.ETC_UTC`).\n- `minute` – Cron minute (`0`–`59`).\n- `hour` – Cron hour (`0`–`23`).\n- `week` – Cron day-of-week field (e.g. `MON-FRI`).\n\n### Secrets\n\n- `slackSecretName` – Name of the AWS Secrets Manager secret. The Lambda expects JSON with **`token`** (Slack bot token) and **`channel`** (channel ID or name for `chat.postMessage`).\n\n### ResourceWaitLimits\n\nWritten to `PROCESS_RESOURCE_MAX_LOOP_COUNT` and `PROCESS_RESOURCE_MAX_ELAPSED_SECONDS` on the running scheduler Lambda.\n\n- `maxLoopCount` – Maximum describe/wait loop iterations per instance (default: **90**). Must be a positive integer when set.\n- `maxElapsedSeconds` – Maximum wall-clock seconds spent waiting for one instance to stabilize (default: **1800**, 30 minutes). Must be a positive integer when set.\n\nWhen a limit is exceeded during waiting, the handler throws an error with prefix `ResourceWaitFailed:` (`MaxLoopCountExceeded`, `MaxElapsedTimeExceeded`, or `UnexpectedInstanceState` for unknown EC2 states).\n\n### FailureDetectionAlarms\n\nOptional operational failure detection. Alarms are created only when `enabled` is `true`.\n\n- `enabled` – When `true`, creates four CloudWatch alarms and three log metric filters (default: disabled when omitted).\n- `alarmTopic` – Optional `sns.ITopic` for alarm actions. The construct does **not** create an SNS topic; pass an existing or imported topic. When omitted, alarms are created without SNS actions.\n\nWhen enabled, the construct creates:\n\n| Alarm | Trigger |\n|-------|---------|\n| Lambda errors | `AWS/Lambda` `Errors` metric |\n| Instance status failure | Log filter: `ResourceWaitFailed` |\n| Slack post failure | Log filter: `running-scheduler: Slack post failed` |\n| Durable execution failure | Other handler `ERROR` logs (excluding the above) |\n\nCustom metrics are published under the `EC2InstanceRunningScheduler` namespace. Access the created alarms via `EC2InstanceRunningScheduler.failureDetection` when enabled.\n\n## Requirements\n\n- **Node.js** ≥ 20.0.0 (for developing or synthesizing CDK apps that depend on this package).\n- **aws-cdk-lib** ^2.232.0 and **constructs** ^10.5.1 (peer dependencies).\n- **AWS** – EventBridge Scheduler; Lambda with **Durable Execution** (Node.js **24.x** runtime in the construct; Durable Execution requires a supported Node.js runtime in your region), a **live alias**, **Parameters and Secrets Lambda Extension**; EC2 (`DescribeInstances`, `StartInstances`, `StopInstances`); Resource Groups Tagging API (`tag:GetResources`); Secrets Manager. The deployed function uses **arm64**, Durable Execution IAM policies, a 2-hour Durable execution timeout (construct default), and a bundled handler that loads secrets via **aws-lambda-secret-fetcher** (^0.6) and parses env vars via **strict-env-resolver** (^0.5). Secret fetch runs only inside Lambda (requires runtime `AWS_SESSION_TOKEN` and the extension layer); the library retries transient extension errors including cold-start \"not ready\" responses.\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n"
8465
8465
  },
8466
8466
  "repository": {
8467
8467
  "type": "git",
@@ -8478,6 +8478,7 @@
8478
8478
  "assembly": "ec2-instance-running-scheduler",
8479
8479
  "base": "aws-cdk-lib.Stack",
8480
8480
  "docs": {
8481
+ "remarks": "Wires {@link EC2InstanceRunningScheduler} with targeting, schedules, secrets, scheduling toggle,\nand optional {@link FailureDetectionAlarms}. Does not expose {@link ResourceWaitLimits }; use the\nconstruct directly when custom per-instance wait limits are required.",
8481
8482
  "stability": "stable",
8482
8483
  "summary": "CDK stack that deploys the EC2 instance running scheduler (EventBridge Scheduler + Durable Lambda)."
8483
8484
  },
@@ -8489,7 +8490,7 @@
8489
8490
  },
8490
8491
  "locationInModule": {
8491
8492
  "filename": "src/stacks/ec2-instance-running-schedule-stack.ts",
8492
- "line": 34
8493
+ "line": 40
8493
8494
  },
8494
8495
  "parameters": [
8495
8496
  {
@@ -8512,7 +8513,7 @@
8512
8513
  },
8513
8514
  {
8514
8515
  "docs": {
8515
- "summary": "- Target resource, schedules, secrets, and standard stack props."
8516
+ "summary": "- Target resource, schedules, secrets, optional failure detection, and standard stack props."
8516
8517
  },
8517
8518
  "name": "props",
8518
8519
  "type": {
@@ -8524,7 +8525,7 @@
8524
8525
  "kind": "class",
8525
8526
  "locationInModule": {
8526
8527
  "filename": "src/stacks/ec2-instance-running-schedule-stack.ts",
8527
- "line": 26
8528
+ "line": 32
8528
8529
  },
8529
8530
  "name": "EC2InstanceRunningScheduleStack",
8530
8531
  "symbolId": "src/stacks/ec2-instance-running-schedule-stack:EC2InstanceRunningScheduleStack"
@@ -8533,7 +8534,7 @@
8533
8534
  "assembly": "ec2-instance-running-scheduler",
8534
8535
  "datatype": true,
8535
8536
  "docs": {
8536
- "see": "{@link EC2InstanceRunningSchedulerProps } for construct-level options not exposed here (e.g. `resourcePolling`).",
8537
+ "see": "{@link EC2InstanceRunningSchedulerProps } for construct-level options not exposed here (e.g. `resourceWait`).",
8537
8538
  "stability": "stable",
8538
8539
  "summary": "Props for the EC2 instance running schedule CDK stack."
8539
8540
  },
@@ -8598,6 +8599,23 @@
8598
8599
  "primitive": "boolean"
8599
8600
  }
8600
8601
  },
8602
+ {
8603
+ "abstract": true,
8604
+ "docs": {
8605
+ "stability": "stable",
8606
+ "summary": "Optional CloudWatch failure detection alarms and log-based metrics."
8607
+ },
8608
+ "immutable": true,
8609
+ "locationInModule": {
8610
+ "filename": "src/stacks/ec2-instance-running-schedule-stack.ts",
8611
+ "line": 22
8612
+ },
8613
+ "name": "failureDetection",
8614
+ "optional": true,
8615
+ "type": {
8616
+ "fqn": "ec2-instance-running-scheduler.FailureDetectionAlarms"
8617
+ }
8618
+ },
8601
8619
  {
8602
8620
  "abstract": true,
8603
8621
  "docs": {
@@ -8639,7 +8657,7 @@
8639
8657
  "assembly": "ec2-instance-running-scheduler",
8640
8658
  "base": "constructs.Construct",
8641
8659
  "docs": {
8642
- "remarks": "Each schedule invokes the function with `Params` (`TagKey`, `TagValues`, `Mode`). The function uses\nthe Resource Groups Tagging API and EC2 APIs; Slack notifications use the secret named in {@link Secrets.slackSecretName}.\n\nPer-instance polling timeouts are configured via {@link EC2InstanceRunningSchedulerProps.resourcePolling}\nand enforced in the handler before the Durable execution timeout.",
8660
+ "remarks": "Each schedule invokes the function with `Params` (`TagKey`, `TagValues`, `Mode`). The function uses\nthe Resource Groups Tagging API and EC2 APIs; Slack notifications use the secret named in {@link Secrets.slackSecretName}.\n\nPer-instance wait timeouts are configured via {@link EC2InstanceRunningSchedulerProps.resourceWait}\nand enforced in the handler before the Durable execution timeout. Optional CloudWatch failure\ndetection is available via {@link EC2InstanceRunningSchedulerProps.failureDetection}.",
8643
8661
  "stability": "stable",
8644
8662
  "summary": "Provisions EventBridge Scheduler rules and a Durable Execution Lambda that start/stop tagged EC2 instances."
8645
8663
  },
@@ -8647,11 +8665,11 @@
8647
8665
  "initializer": {
8648
8666
  "docs": {
8649
8667
  "stability": "stable",
8650
- "summary": "Defines IAM, logging, two cron schedules (start/stop), and the bundled running-scheduler Lambda (Node.js, Durable Execution)."
8668
+ "summary": "Defines IAM, logging, optional failure detection alarms, two cron schedules (start/stop), and the bundled running-scheduler Lambda (Node.js, Durable Execution)."
8651
8669
  },
8652
8670
  "locationInModule": {
8653
8671
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8654
- "line": 109
8672
+ "line": 136
8655
8673
  },
8656
8674
  "parameters": [
8657
8675
  {
@@ -8674,7 +8692,7 @@
8674
8692
  },
8675
8693
  {
8676
8694
  "docs": {
8677
- "summary": "- Target tags, schedules, Slack secret, schedule enable flag, and optional {@link ResourcePollingLimits}."
8695
+ "summary": "- Target tags, schedules, Slack secret, schedule enable flag, optional {@link ResourceWaitLimits}, and optional {@link FailureDetectionAlarms}."
8678
8696
  },
8679
8697
  "name": "props",
8680
8698
  "type": {
@@ -8686,9 +8704,27 @@
8686
8704
  "kind": "class",
8687
8705
  "locationInModule": {
8688
8706
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8689
- "line": 101
8707
+ "line": 123
8690
8708
  },
8691
8709
  "name": "EC2InstanceRunningScheduler",
8710
+ "properties": [
8711
+ {
8712
+ "docs": {
8713
+ "stability": "stable",
8714
+ "summary": "Failure detection alarms, when {@link EC2InstanceRunningSchedulerProps.failureDetection} is enabled."
8715
+ },
8716
+ "immutable": true,
8717
+ "locationInModule": {
8718
+ "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8719
+ "line": 125
8720
+ },
8721
+ "name": "failureDetection",
8722
+ "optional": true,
8723
+ "type": {
8724
+ "fqn": "ec2-instance-running-scheduler.RunningSchedulerFailureDetection"
8725
+ }
8726
+ }
8727
+ ],
8692
8728
  "symbolId": "src/constructs/ec2-instance-running-scheduler:EC2InstanceRunningScheduler"
8693
8729
  },
8694
8730
  "ec2-instance-running-scheduler.EC2InstanceRunningSchedulerProps": {
@@ -8702,7 +8738,7 @@
8702
8738
  "kind": "interface",
8703
8739
  "locationInModule": {
8704
8740
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8705
- "line": 73
8741
+ "line": 86
8706
8742
  },
8707
8743
  "name": "EC2InstanceRunningSchedulerProps",
8708
8744
  "properties": [
@@ -8715,7 +8751,7 @@
8715
8751
  "immutable": true,
8716
8752
  "locationInModule": {
8717
8753
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8718
- "line": 79
8754
+ "line": 92
8719
8755
  },
8720
8756
  "name": "secrets",
8721
8757
  "type": {
@@ -8731,7 +8767,7 @@
8731
8767
  "immutable": true,
8732
8768
  "locationInModule": {
8733
8769
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8734
- "line": 75
8770
+ "line": 88
8735
8771
  },
8736
8772
  "name": "targetResource",
8737
8773
  "type": {
@@ -8748,7 +8784,7 @@
8748
8784
  "immutable": true,
8749
8785
  "locationInModule": {
8750
8786
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8751
- "line": 77
8787
+ "line": 90
8752
8788
  },
8753
8789
  "name": "enableScheduling",
8754
8790
  "optional": true,
@@ -8759,19 +8795,38 @@
8759
8795
  {
8760
8796
  "abstract": true,
8761
8797
  "docs": {
8762
- "default": "{@link DEFAULT_RESOURCE_POLLING_LIMITS }",
8798
+ "default": "disabled when omitted",
8799
+ "remarks": "Set `enabled: true` to create alarms; optionally pass `alarmTopic` for SNS notifications.",
8763
8800
  "stability": "stable",
8764
- "summary": "Per-instance polling limits for the running scheduler Lambda."
8801
+ "summary": "Optional CloudWatch alarms and log-based metrics for failure detection."
8765
8802
  },
8766
8803
  "immutable": true,
8767
8804
  "locationInModule": {
8768
8805
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8769
- "line": 89
8806
+ "line": 110
8770
8807
  },
8771
- "name": "resourcePolling",
8808
+ "name": "failureDetection",
8772
8809
  "optional": true,
8773
8810
  "type": {
8774
- "fqn": "ec2-instance-running-scheduler.ResourcePollingLimits"
8811
+ "fqn": "ec2-instance-running-scheduler.FailureDetectionAlarms"
8812
+ }
8813
+ },
8814
+ {
8815
+ "abstract": true,
8816
+ "docs": {
8817
+ "default": "{@link DEFAULT_RESOURCE_WAIT_LIMITS }",
8818
+ "stability": "stable",
8819
+ "summary": "Per-instance wait limits for the running scheduler Lambda."
8820
+ },
8821
+ "immutable": true,
8822
+ "locationInModule": {
8823
+ "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8824
+ "line": 102
8825
+ },
8826
+ "name": "resourceWait",
8827
+ "optional": true,
8828
+ "type": {
8829
+ "fqn": "ec2-instance-running-scheduler.ResourceWaitLimits"
8775
8830
  }
8776
8831
  },
8777
8832
  {
@@ -8783,7 +8838,7 @@
8783
8838
  "immutable": true,
8784
8839
  "locationInModule": {
8785
8840
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8786
- "line": 83
8841
+ "line": 96
8787
8842
  },
8788
8843
  "name": "startSchedule",
8789
8844
  "optional": true,
@@ -8800,7 +8855,7 @@
8800
8855
  "immutable": true,
8801
8856
  "locationInModule": {
8802
8857
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8803
- "line": 81
8858
+ "line": 94
8804
8859
  },
8805
8860
  "name": "stopSchedule",
8806
8861
  "optional": true,
@@ -8811,33 +8866,89 @@
8811
8866
  ],
8812
8867
  "symbolId": "src/constructs/ec2-instance-running-scheduler:EC2InstanceRunningSchedulerProps"
8813
8868
  },
8814
- "ec2-instance-running-scheduler.ResourcePollingLimits": {
8869
+ "ec2-instance-running-scheduler.FailureDetectionAlarms": {
8815
8870
  "assembly": "ec2-instance-running-scheduler",
8816
8871
  "datatype": true,
8817
8872
  "docs": {
8818
- "remarks": "Values are written to {@link PROCESS_RESOURCE_MAX_LOOP_COUNT_ENV} and\n{@link PROCESS_RESOURCE_MAX_ELAPSED_SECONDS_ENV} on the running scheduler function.\nPrevents abnormal or stuck transitions from running until the Durable execution timeout.",
8873
+ "remarks": "When {@link FailureDetectionAlarms.enabled} is true, the construct creates alarms for Lambda\nerrors, Durable handler failures, EC2 instance status wait failures, and Slack post failures.\nAlarms can optionally notify an SNS topic supplied by the caller.",
8819
8874
  "stability": "stable",
8820
- "summary": "CDK-side limits for per-instance stable-state polling in the Durable Lambda handler."
8875
+ "summary": "Optional CloudWatch alarms and log-based metrics for operational failure detection."
8821
8876
  },
8822
- "fqn": "ec2-instance-running-scheduler.ResourcePollingLimits",
8877
+ "fqn": "ec2-instance-running-scheduler.FailureDetectionAlarms",
8878
+ "kind": "interface",
8879
+ "locationInModule": {
8880
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
8881
+ "line": 31
8882
+ },
8883
+ "name": "FailureDetectionAlarms",
8884
+ "properties": [
8885
+ {
8886
+ "abstract": true,
8887
+ "docs": {
8888
+ "remarks": "When omitted, alarms are created without SNS actions.",
8889
+ "stability": "stable",
8890
+ "summary": "SNS topic for alarm notifications."
8891
+ },
8892
+ "immutable": true,
8893
+ "locationInModule": {
8894
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
8895
+ "line": 43
8896
+ },
8897
+ "name": "alarmTopic",
8898
+ "optional": true,
8899
+ "type": {
8900
+ "fqn": "aws-cdk-lib.aws_sns.ITopic"
8901
+ }
8902
+ },
8903
+ {
8904
+ "abstract": true,
8905
+ "docs": {
8906
+ "default": "false when omitted",
8907
+ "stability": "stable",
8908
+ "summary": "When true, creates failure detection alarms and log-based metrics."
8909
+ },
8910
+ "immutable": true,
8911
+ "locationInModule": {
8912
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
8913
+ "line": 37
8914
+ },
8915
+ "name": "enabled",
8916
+ "optional": true,
8917
+ "type": {
8918
+ "primitive": "boolean"
8919
+ }
8920
+ }
8921
+ ],
8922
+ "symbolId": "src/constructs/running-scheduler-failure-detection:FailureDetectionAlarms"
8923
+ },
8924
+ "ec2-instance-running-scheduler.ResourceWaitLimits": {
8925
+ "assembly": "ec2-instance-running-scheduler",
8926
+ "datatype": true,
8927
+ "docs": {
8928
+ "remarks": "Optional fields map to {@link PROCESS_RESOURCE_MAX_LOOP_COUNT_ENV} and\n{@link PROCESS_RESOURCE_MAX_ELAPSED_SECONDS_ENV} on the running scheduler function.\nPrevents abnormal or stuck transitions from running until the Durable execution timeout.",
8929
+ "see": "{@link ResourceWaitLimits } in `running-scheduler-predicates.ts` for the handler-side required shape.",
8930
+ "stability": "stable",
8931
+ "summary": "CDK-side limits for per-instance stable-state waiting in the Durable Lambda handler."
8932
+ },
8933
+ "fqn": "ec2-instance-running-scheduler.ResourceWaitLimits",
8823
8934
  "kind": "interface",
8824
8935
  "locationInModule": {
8825
8936
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8826
- "line": 55
8937
+ "line": 68
8827
8938
  },
8828
- "name": "ResourcePollingLimits",
8939
+ "name": "ResourceWaitLimits",
8829
8940
  "properties": [
8830
8941
  {
8831
8942
  "abstract": true,
8832
8943
  "docs": {
8833
- "default": "{@link DEFAULT_RESOURCE_POLLING_LIMITS.maxElapsedSeconds } (1800, 30 minutes)",
8944
+ "default": "{@link DEFAULT_RESOURCE_WAIT_LIMITS.maxElapsedSeconds } (1800, 30 minutes)",
8834
8945
  "stability": "stable",
8835
- "summary": "Maximum wall-clock seconds spent polling a single instance."
8946
+ "summary": "Maximum wall-clock seconds spent waiting for a single instance to stabilize."
8836
8947
  },
8837
8948
  "immutable": true,
8838
8949
  "locationInModule": {
8839
8950
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8840
- "line": 67
8951
+ "line": 80
8841
8952
  },
8842
8953
  "name": "maxElapsedSeconds",
8843
8954
  "optional": true,
@@ -8848,14 +8959,14 @@
8848
8959
  {
8849
8960
  "abstract": true,
8850
8961
  "docs": {
8851
- "default": "{@link DEFAULT_RESOURCE_POLLING_LIMITS.maxLoopCount } (90)",
8962
+ "default": "{@link DEFAULT_RESOURCE_WAIT_LIMITS.maxLoopCount } (90)",
8852
8963
  "stability": "stable",
8853
- "summary": "Maximum describe/poll loop iterations per instance."
8964
+ "summary": "Maximum describe/wait loop iterations per instance."
8854
8965
  },
8855
8966
  "immutable": true,
8856
8967
  "locationInModule": {
8857
8968
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8858
- "line": 61
8969
+ "line": 74
8859
8970
  },
8860
8971
  "name": "maxLoopCount",
8861
8972
  "optional": true,
@@ -8864,7 +8975,206 @@
8864
8975
  }
8865
8976
  }
8866
8977
  ],
8867
- "symbolId": "src/constructs/ec2-instance-running-scheduler:ResourcePollingLimits"
8978
+ "symbolId": "src/constructs/ec2-instance-running-scheduler:ResourceWaitLimits"
8979
+ },
8980
+ "ec2-instance-running-scheduler.RunningSchedulerFailureDetection": {
8981
+ "assembly": "ec2-instance-running-scheduler",
8982
+ "base": "constructs.Construct",
8983
+ "docs": {
8984
+ "remarks": "When enabled, creates four alarms:\n- `lambdaErrorsAlarm` – `AWS/Lambda` `Errors` metric.\n- `instanceStatusFailureAlarm` – log filter for `ResourceWaitFailed:*`.\n- `slackPostFailureAlarm` – log filter for `running-scheduler: Slack post failed`.\n- `durableExecutionFailureAlarm` – other handler-level `ERROR` logs (excluding the above).\n\nCustom metrics are published under the `EC2InstanceRunningScheduler` namespace.",
8985
+ "stability": "stable",
8986
+ "summary": "CloudWatch alarms and log-based metrics for the running scheduler Lambda."
8987
+ },
8988
+ "fqn": "ec2-instance-running-scheduler.RunningSchedulerFailureDetection",
8989
+ "initializer": {
8990
+ "docs": {
8991
+ "stability": "stable"
8992
+ },
8993
+ "locationInModule": {
8994
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
8995
+ "line": 132
8996
+ },
8997
+ "parameters": [
8998
+ {
8999
+ "docs": {
9000
+ "summary": "- Parent construct."
9001
+ },
9002
+ "name": "scope",
9003
+ "type": {
9004
+ "fqn": "constructs.Construct"
9005
+ }
9006
+ },
9007
+ {
9008
+ "docs": {
9009
+ "summary": "- Construct id."
9010
+ },
9011
+ "name": "id",
9012
+ "type": {
9013
+ "primitive": "string"
9014
+ }
9015
+ },
9016
+ {
9017
+ "docs": {
9018
+ "summary": "- Lambda, log group, and {@link FailureDetectionAlarms} (must have `enabled: true`)."
9019
+ },
9020
+ "name": "props",
9021
+ "type": {
9022
+ "fqn": "ec2-instance-running-scheduler.RunningSchedulerFailureDetectionProps"
9023
+ }
9024
+ }
9025
+ ]
9026
+ },
9027
+ "kind": "class",
9028
+ "locationInModule": {
9029
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
9030
+ "line": 115
9031
+ },
9032
+ "name": "RunningSchedulerFailureDetection",
9033
+ "properties": [
9034
+ {
9035
+ "docs": {
9036
+ "stability": "stable",
9037
+ "summary": "Fires on handler-level ERROR logs outside instance waiting and Slack post failures."
9038
+ },
9039
+ "immutable": true,
9040
+ "locationInModule": {
9041
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
9042
+ "line": 121
9043
+ },
9044
+ "name": "durableExecutionFailureAlarm",
9045
+ "type": {
9046
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm"
9047
+ }
9048
+ },
9049
+ {
9050
+ "docs": {
9051
+ "stability": "stable",
9052
+ "summary": "Fires when instance stable-state waiting fails (`ResourceWaitFailed:*`)."
9053
+ },
9054
+ "immutable": true,
9055
+ "locationInModule": {
9056
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
9057
+ "line": 123
9058
+ },
9059
+ "name": "instanceStatusFailureAlarm",
9060
+ "type": {
9061
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm"
9062
+ }
9063
+ },
9064
+ {
9065
+ "docs": {
9066
+ "stability": "stable",
9067
+ "summary": "Fires when the Lambda `Errors` metric is non-zero."
9068
+ },
9069
+ "immutable": true,
9070
+ "locationInModule": {
9071
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
9072
+ "line": 119
9073
+ },
9074
+ "name": "lambdaErrorsAlarm",
9075
+ "type": {
9076
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm"
9077
+ }
9078
+ },
9079
+ {
9080
+ "docs": {
9081
+ "stability": "stable",
9082
+ "summary": "Fires when Slack `chat.postMessage` fails."
9083
+ },
9084
+ "immutable": true,
9085
+ "locationInModule": {
9086
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
9087
+ "line": 125
9088
+ },
9089
+ "name": "slackPostFailureAlarm",
9090
+ "type": {
9091
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm"
9092
+ }
9093
+ },
9094
+ {
9095
+ "docs": {
9096
+ "stability": "stable",
9097
+ "summary": "SNS topic used for alarm actions, when configured."
9098
+ },
9099
+ "immutable": true,
9100
+ "locationInModule": {
9101
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
9102
+ "line": 117
9103
+ },
9104
+ "name": "alarmTopic",
9105
+ "optional": true,
9106
+ "type": {
9107
+ "fqn": "aws-cdk-lib.aws_sns.ITopic"
9108
+ }
9109
+ }
9110
+ ],
9111
+ "symbolId": "src/constructs/running-scheduler-failure-detection:RunningSchedulerFailureDetection"
9112
+ },
9113
+ "ec2-instance-running-scheduler.RunningSchedulerFailureDetectionProps": {
9114
+ "assembly": "ec2-instance-running-scheduler",
9115
+ "datatype": true,
9116
+ "docs": {
9117
+ "stability": "stable",
9118
+ "summary": "Props for {@link RunningSchedulerFailureDetection}."
9119
+ },
9120
+ "fqn": "ec2-instance-running-scheduler.RunningSchedulerFailureDetectionProps",
9121
+ "kind": "interface",
9122
+ "locationInModule": {
9123
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
9124
+ "line": 49
9125
+ },
9126
+ "name": "RunningSchedulerFailureDetectionProps",
9127
+ "properties": [
9128
+ {
9129
+ "abstract": true,
9130
+ "docs": {
9131
+ "stability": "stable",
9132
+ "summary": "Alarm configuration (must have {@link FailureDetectionAlarms.enabled} true)."
9133
+ },
9134
+ "immutable": true,
9135
+ "locationInModule": {
9136
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
9137
+ "line": 51
9138
+ },
9139
+ "name": "failureDetection",
9140
+ "type": {
9141
+ "fqn": "ec2-instance-running-scheduler.FailureDetectionAlarms"
9142
+ }
9143
+ },
9144
+ {
9145
+ "abstract": true,
9146
+ "docs": {
9147
+ "stability": "stable",
9148
+ "summary": "Application log group for the running scheduler Lambda."
9149
+ },
9150
+ "immutable": true,
9151
+ "locationInModule": {
9152
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
9153
+ "line": 55
9154
+ },
9155
+ "name": "logGroup",
9156
+ "type": {
9157
+ "fqn": "aws-cdk-lib.aws_logs.ILogGroup"
9158
+ }
9159
+ },
9160
+ {
9161
+ "abstract": true,
9162
+ "docs": {
9163
+ "stability": "stable",
9164
+ "summary": "Running scheduler Lambda to monitor."
9165
+ },
9166
+ "immutable": true,
9167
+ "locationInModule": {
9168
+ "filename": "src/constructs/running-scheduler-failure-detection.ts",
9169
+ "line": 53
9170
+ },
9171
+ "name": "runningScheduleFunction",
9172
+ "type": {
9173
+ "fqn": "aws-cdk-lib.aws_lambda.IFunction"
9174
+ }
9175
+ }
9176
+ ],
9177
+ "symbolId": "src/constructs/running-scheduler-failure-detection:RunningSchedulerFailureDetectionProps"
8868
9178
  },
8869
9179
  "ec2-instance-running-scheduler.Schedule": {
8870
9180
  "assembly": "ec2-instance-running-scheduler",
@@ -8877,7 +9187,7 @@
8877
9187
  "kind": "interface",
8878
9188
  "locationInModule": {
8879
9189
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8880
- "line": 19
9190
+ "line": 30
8881
9191
  },
8882
9192
  "name": "Schedule",
8883
9193
  "properties": [
@@ -8890,7 +9200,7 @@
8890
9200
  "immutable": true,
8891
9201
  "locationInModule": {
8892
9202
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8893
- "line": 21
9203
+ "line": 32
8894
9204
  },
8895
9205
  "name": "timezone",
8896
9206
  "type": {
@@ -8906,7 +9216,7 @@
8906
9216
  "immutable": true,
8907
9217
  "locationInModule": {
8908
9218
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8909
- "line": 25
9219
+ "line": 36
8910
9220
  },
8911
9221
  "name": "hour",
8912
9222
  "optional": true,
@@ -8923,7 +9233,7 @@
8923
9233
  "immutable": true,
8924
9234
  "locationInModule": {
8925
9235
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8926
- "line": 23
9236
+ "line": 34
8927
9237
  },
8928
9238
  "name": "minute",
8929
9239
  "optional": true,
@@ -8940,7 +9250,7 @@
8940
9250
  "immutable": true,
8941
9251
  "locationInModule": {
8942
9252
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8943
- "line": 27
9253
+ "line": 38
8944
9254
  },
8945
9255
  "name": "week",
8946
9256
  "optional": true,
@@ -8962,7 +9272,7 @@
8962
9272
  "kind": "interface",
8963
9273
  "locationInModule": {
8964
9274
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8965
- "line": 43
9275
+ "line": 54
8966
9276
  },
8967
9277
  "name": "Secrets",
8968
9278
  "properties": [
@@ -8975,7 +9285,7 @@
8975
9285
  "immutable": true,
8976
9286
  "locationInModule": {
8977
9287
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8978
- "line": 45
9288
+ "line": 56
8979
9289
  },
8980
9290
  "name": "slackSecretName",
8981
9291
  "type": {
@@ -8996,7 +9306,7 @@
8996
9306
  "kind": "interface",
8997
9307
  "locationInModule": {
8998
9308
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
8999
- "line": 33
9309
+ "line": 44
9000
9310
  },
9001
9311
  "name": "TargetResource",
9002
9312
  "properties": [
@@ -9009,7 +9319,7 @@
9009
9319
  "immutable": true,
9010
9320
  "locationInModule": {
9011
9321
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
9012
- "line": 35
9322
+ "line": 46
9013
9323
  },
9014
9324
  "name": "tagKey",
9015
9325
  "type": {
@@ -9025,7 +9335,7 @@
9025
9335
  "immutable": true,
9026
9336
  "locationInModule": {
9027
9337
  "filename": "src/constructs/ec2-instance-running-scheduler.ts",
9028
- "line": 37
9338
+ "line": 48
9029
9339
  },
9030
9340
  "name": "tagValues",
9031
9341
  "type": {
@@ -9041,6 +9351,6 @@
9041
9351
  "symbolId": "src/constructs/ec2-instance-running-scheduler:TargetResource"
9042
9352
  }
9043
9353
  },
9044
- "version": "0.2.7",
9045
- "fingerprint": "vh5lSZ1r+w01KIrqSdRiUxdYdRCWaCfJR2Rg3QXGWQY="
9354
+ "version": "0.3.0",
9355
+ "fingerprint": "bwKUClibSPFDZfqak8YNEMPWz002RMgKad/Ke/6VtnE="
9046
9356
  }