gammarers.aws-ec2-instance-running-schedule-stack


Namegammarers.aws-ec2-instance-running-schedule-stack JSON
Version 2.3.9 PyPI version JSON
download
home_pagehttps://github.com/gammarers/aws-ec2-instance-running-schedule-stack.git
SummaryAWS EC2 Instance Running Scheduler
upload_time2025-09-03 16:41:56
maintainerNone
docs_urlNone
authoryicr<yicr@users.noreply.github.com>
requires_python~=3.9
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AWS EC2 Instance Running Schedule Stack

[![GitHub](https://img.shields.io/github/license/gammarers/aws-ec2-instance-running-schedule-stack?style=flat-square)](https://github.com/gammarers/aws-ec2-instance-running-schedule-stack/blob/main/LICENSE)
[![npm (scoped)](https://img.shields.io/npm/v/@gammarers/aws-ec2-instance-running-schedule-stack?style=flat-square)](https://www.npmjs.com/package/@gammarers/aws-ec2-instance-running-schedule-stack)
[![PyPI](https://img.shields.io/pypi/v/gammarers.aws-ec2-instance-running-schedule-stack?style=flat-square)](https://pypi.org/project/gammarers.aws-ec2-instance-running-schedule-stack/)
[![Nuget](https://img.shields.io/nuget/v/Gammarers.CDK.AWS.EC2InstanceRunningScheduleStack?style=flat-square)](https://www.nuget.org/packages/Gammarers.CDK.AWS.EC2InstanceRunningScheduleStack/)
[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/gammarers/aws-ec2-instance-running-schedule-stack/release.yml?branch=main&label=release&style=flat-square)](https://github.com/gammarers/aws-ec2-instance-running-schedule-stack/actions/workflows/release.yml)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gammarers/aws-ec2-instance-running-schedule-stack?sort=semver&style=flat-square)](https://github.com/gammarers/aws-ec2-instance-running-schedule-stack/releases)

[![View on Construct Hub](https://constructs.dev/badge?package=@gammarers/aws-ec2-instance-running-schedule-stack)](https://constructs.dev/packages/@gammarers/aws-ec2-instance-running-schedule-stack)

This is an AWS CDK Construct to make EC2 instance running schedule (only running while working hours(start/stop)).

## Fixed

* EC2 Instance

## Resources

This construct creating resource list.

* EventBridge Scheduler execution role
* EventBridge Scheduler
* Step Functions State machine
* Step Functions State machine role

## State Machine Execution Flow

![](./images/state-machine.png)

## Install

### TypeScript

#### install by npm

```shell
npm install @gammarer/aws-ec2-instance-running-schedule-stack
```

#### install by yarn

```shell
yarn add @gammarer/aws-ec2-instance-running-schedule-stack
```

### Python

```shell
pip install gammarer.aws-ec2-instance-running-schedule-stack
```

### C# / .NET

```shell
dotnet add package Gammarer.CDK.AWS.Ec2InstanceRunningScheduleStack
```

## Example

```python
import { Ec2InstanceRunningScheduleStack } from '@gammarer/aws-ec2-instance-running-schedule-stack';

new EC2InstanceRunningScheduleStack(app, 'EC2InstanceRunningScheduleStack', {
  targetResource: {
    tagKey: 'WorkHoursRunning',
    tagValues: ['YES'],
  },
  startSchedule: {
    timezone: 'Asia/Tokyo',
    minute: '55',
    hour: '8',
    week: 'MON-FRI',
  },
  stopSchedule: {
    timezone: 'Asia/Tokyo',
    minute: '5',
    hour: '19',
    week: 'MON-FRI',
  },
  notifications: { // OPTIONAL NOTIFICATION
    emails: [  // OPTIONAL SEND EMAIL FROM SNS
      'foo@example.com',
      'bar@example.net',
    ],
  },
});
```

## License

This project is licensed under the Apache-2.0 License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gammarers/aws-ec2-instance-running-schedule-stack.git",
    "name": "gammarers.aws-ec2-instance-running-schedule-stack",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "yicr<yicr@users.noreply.github.com>",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/a5/d5/5dbb97eb60ce4280a6aba4063f0c999786fe006cd33574b26c3b5c97dc92/gammarers_aws_ec2_instance_running_schedule_stack-2.3.9.tar.gz",
    "platform": null,
    "description": "# AWS EC2 Instance Running Schedule Stack\n\n[![GitHub](https://img.shields.io/github/license/gammarers/aws-ec2-instance-running-schedule-stack?style=flat-square)](https://github.com/gammarers/aws-ec2-instance-running-schedule-stack/blob/main/LICENSE)\n[![npm (scoped)](https://img.shields.io/npm/v/@gammarers/aws-ec2-instance-running-schedule-stack?style=flat-square)](https://www.npmjs.com/package/@gammarers/aws-ec2-instance-running-schedule-stack)\n[![PyPI](https://img.shields.io/pypi/v/gammarers.aws-ec2-instance-running-schedule-stack?style=flat-square)](https://pypi.org/project/gammarers.aws-ec2-instance-running-schedule-stack/)\n[![Nuget](https://img.shields.io/nuget/v/Gammarers.CDK.AWS.EC2InstanceRunningScheduleStack?style=flat-square)](https://www.nuget.org/packages/Gammarers.CDK.AWS.EC2InstanceRunningScheduleStack/)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/gammarers/aws-ec2-instance-running-schedule-stack/release.yml?branch=main&label=release&style=flat-square)](https://github.com/gammarers/aws-ec2-instance-running-schedule-stack/actions/workflows/release.yml)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gammarers/aws-ec2-instance-running-schedule-stack?sort=semver&style=flat-square)](https://github.com/gammarers/aws-ec2-instance-running-schedule-stack/releases)\n\n[![View on Construct Hub](https://constructs.dev/badge?package=@gammarers/aws-ec2-instance-running-schedule-stack)](https://constructs.dev/packages/@gammarers/aws-ec2-instance-running-schedule-stack)\n\nThis is an AWS CDK Construct to make EC2 instance running schedule (only running while working hours(start/stop)).\n\n## Fixed\n\n* EC2 Instance\n\n## Resources\n\nThis construct creating resource list.\n\n* EventBridge Scheduler execution role\n* EventBridge Scheduler\n* Step Functions State machine\n* Step Functions State machine role\n\n## State Machine Execution Flow\n\n![](./images/state-machine.png)\n\n## Install\n\n### TypeScript\n\n#### install by npm\n\n```shell\nnpm install @gammarer/aws-ec2-instance-running-schedule-stack\n```\n\n#### install by yarn\n\n```shell\nyarn add @gammarer/aws-ec2-instance-running-schedule-stack\n```\n\n### Python\n\n```shell\npip install gammarer.aws-ec2-instance-running-schedule-stack\n```\n\n### C# / .NET\n\n```shell\ndotnet add package Gammarer.CDK.AWS.Ec2InstanceRunningScheduleStack\n```\n\n## Example\n\n```python\nimport { Ec2InstanceRunningScheduleStack } from '@gammarer/aws-ec2-instance-running-schedule-stack';\n\nnew EC2InstanceRunningScheduleStack(app, 'EC2InstanceRunningScheduleStack', {\n  targetResource: {\n    tagKey: 'WorkHoursRunning',\n    tagValues: ['YES'],\n  },\n  startSchedule: {\n    timezone: 'Asia/Tokyo',\n    minute: '55',\n    hour: '8',\n    week: 'MON-FRI',\n  },\n  stopSchedule: {\n    timezone: 'Asia/Tokyo',\n    minute: '5',\n    hour: '19',\n    week: 'MON-FRI',\n  },\n  notifications: { // OPTIONAL NOTIFICATION\n    emails: [  // OPTIONAL SEND EMAIL FROM SNS\n      'foo@example.com',\n      'bar@example.net',\n    ],\n  },\n});\n```\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "AWS EC2 Instance Running Scheduler",
    "version": "2.3.9",
    "project_urls": {
        "Homepage": "https://github.com/gammarers/aws-ec2-instance-running-schedule-stack.git",
        "Source": "https://github.com/gammarers/aws-ec2-instance-running-schedule-stack.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6040ffe5d1a2c333c48be3555cd92a0289772a290186e757bb99b9a23b2b3f4f",
                "md5": "d9dd3fc1ebcf32c15f714c5c0059bbb9",
                "sha256": "ef7661e9fe8199956db3a013b4f2ce37412db1ab1336bf30426523458c8a41e9"
            },
            "downloads": -1,
            "filename": "gammarers_aws_ec2_instance_running_schedule_stack-2.3.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d9dd3fc1ebcf32c15f714c5c0059bbb9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.9",
            "size": 272521,
            "upload_time": "2025-09-03T16:41:55",
            "upload_time_iso_8601": "2025-09-03T16:41:55.504669Z",
            "url": "https://files.pythonhosted.org/packages/60/40/ffe5d1a2c333c48be3555cd92a0289772a290186e757bb99b9a23b2b3f4f/gammarers_aws_ec2_instance_running_schedule_stack-2.3.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a5d55dbb97eb60ce4280a6aba4063f0c999786fe006cd33574b26c3b5c97dc92",
                "md5": "6111e9ef112c2440703b59518f59af4b",
                "sha256": "450babb1984012555c9d0423651ed7ae8c6eff06cc5fa9b058b4d9749e968299"
            },
            "downloads": -1,
            "filename": "gammarers_aws_ec2_instance_running_schedule_stack-2.3.9.tar.gz",
            "has_sig": false,
            "md5_digest": "6111e9ef112c2440703b59518f59af4b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.9",
            "size": 273434,
            "upload_time": "2025-09-03T16:41:56",
            "upload_time_iso_8601": "2025-09-03T16:41:56.582272Z",
            "url": "https://files.pythonhosted.org/packages/a5/d5/5dbb97eb60ce4280a6aba4063f0c999786fe006cd33574b26c3b5c97dc92/gammarers_aws_ec2_instance_running_schedule_stack-2.3.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-03 16:41:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gammarers",
    "github_project": "aws-ec2-instance-running-schedule-stack",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "gammarers.aws-ec2-instance-running-schedule-stack"
}
        
Elapsed time: 1.28486s