[](https://github.com/yicr/aws-ec2-instance-running-scheduler/blob/main/LICENSE)
[](https://www.npmjs.com/package/@gammarer/aws-ec2-instance-running-scheduler)
[](https://pypi.org/project/gammarer.aws-ec2-instance-running-scheduler/)
[](https://www.nuget.org/packages/Gammarer.CDK.AWS.Ec2InstanceRunningScheduler/)
[](https://s01.oss.sonatype.org/content/repositories/releases/com/gammarer/aws-ec2-instance-running-scheduler/)
[](https://github.com/yicr/aws-ec2-instance-running-scheduler/actions/workflows/release.yml)
[](https://github.com/yicr/aws-ec2-instance-running-scheduler/releases)
# AWS EC2 Instance Running Scheduler
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
## Install
### TypeScript
```shell
npm install @gammarer/aws-ec2-instance-running-scheduler
# or
yarn add @gammarer/aws-ec2-instance-running-scheduler
```
### Python
```shell
pip install gammarer.aws-ec2-instance-running-scheduler
```
### C# / .NET
```shell
dotnet add package Gammarer.CDK.AWS.Ec2InstanceRunningScheduler
```
### Java
Add the following to pom.xml:
```xml
<dependency>
<groupId>com.gammarer</groupId>
<artifactId>aws-ec2-instance-running-scheduler</artifactId>
</dependency>
```
## Example
```python
import { Ec2InstanceRunningScheduler } from '@gammarer/aws-ec2-instance-running-scheduler';
new Ec2InstanceRunningScheduler(stack, 'Ec2InstanceRunningScheduler', {
targets: [
{
instances: ['i-0af01c0123456789a', 'i-0af01c0123456789b'],
startSchedule: {
timezone: 'Asia/Tokyo',
minute: '55',
hour: '8',
week: 'MON-FRI',
},
stopSchedule: {
timezone: 'Asia/Tokyo',
minute: '5',
hour: '19',
week: 'MON-FRI',
},
},
],
});
```
## License
This project is licensed under the Apache-2.0 License.
Raw data
{
"_id": null,
"home_page": "https://github.com/gammarer/aws-ec2-instance-running-scheduler.git",
"name": "gammarer.aws-ec2-instance-running-scheduler",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.8",
"maintainer_email": null,
"keywords": null,
"author": "yicr<yicr@users.noreply.github.com>",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/a6/82/1811f8740fb04eb8cf3df33f2235b82b11c39e27d12bdbd04fb209a6436b/gammarer.aws-ec2-instance-running-scheduler-1.1.17.tar.gz",
"platform": null,
"description": "[](https://github.com/yicr/aws-ec2-instance-running-scheduler/blob/main/LICENSE)\n[](https://www.npmjs.com/package/@gammarer/aws-ec2-instance-running-scheduler)\n[](https://pypi.org/project/gammarer.aws-ec2-instance-running-scheduler/)\n[](https://www.nuget.org/packages/Gammarer.CDK.AWS.Ec2InstanceRunningScheduler/)\n[](https://s01.oss.sonatype.org/content/repositories/releases/com/gammarer/aws-ec2-instance-running-scheduler/)\n[](https://github.com/yicr/aws-ec2-instance-running-scheduler/actions/workflows/release.yml)\n[](https://github.com/yicr/aws-ec2-instance-running-scheduler/releases)\n\n# AWS EC2 Instance Running Scheduler\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\n## Install\n\n### TypeScript\n\n```shell\nnpm install @gammarer/aws-ec2-instance-running-scheduler\n# or\nyarn add @gammarer/aws-ec2-instance-running-scheduler\n```\n\n### Python\n\n```shell\npip install gammarer.aws-ec2-instance-running-scheduler\n```\n\n### C# / .NET\n\n```shell\ndotnet add package Gammarer.CDK.AWS.Ec2InstanceRunningScheduler\n```\n\n### Java\n\nAdd the following to pom.xml:\n\n```xml\n<dependency>\n <groupId>com.gammarer</groupId>\n <artifactId>aws-ec2-instance-running-scheduler</artifactId>\n</dependency>\n```\n\n## Example\n\n```python\nimport { Ec2InstanceRunningScheduler } from '@gammarer/aws-ec2-instance-running-scheduler';\n\nnew Ec2InstanceRunningScheduler(stack, 'Ec2InstanceRunningScheduler', {\n targets: [\n {\n instances: ['i-0af01c0123456789a', 'i-0af01c0123456789b'],\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 },\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": "1.1.17",
"project_urls": {
"Homepage": "https://github.com/gammarer/aws-ec2-instance-running-scheduler.git",
"Source": "https://github.com/gammarer/aws-ec2-instance-running-scheduler.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fdc4081e345a5351fecf685c2a6f30174fb7698e25a276d325050fbae00f0019",
"md5": "34aec67917b4238e4c13209027e7a878",
"sha256": "2dc8f4b175bd871ae09d8e1b43a6ad1961950fb261d78529375db8a5a0043027"
},
"downloads": -1,
"filename": "gammarer.aws_ec2_instance_running_scheduler-1.1.17-py3-none-any.whl",
"has_sig": false,
"md5_digest": "34aec67917b4238e4c13209027e7a878",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.8",
"size": 32136,
"upload_time": "2024-05-01T16:21:42",
"upload_time_iso_8601": "2024-05-01T16:21:42.837543Z",
"url": "https://files.pythonhosted.org/packages/fd/c4/081e345a5351fecf685c2a6f30174fb7698e25a276d325050fbae00f0019/gammarer.aws_ec2_instance_running_scheduler-1.1.17-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a6821811f8740fb04eb8cf3df33f2235b82b11c39e27d12bdbd04fb209a6436b",
"md5": "075fc888286c0a5f0fd1c8659597f004",
"sha256": "9c91ae95557634cbd0c5f0fe0c64fdbafebd0d61399615a7c9905265b864af5a"
},
"downloads": -1,
"filename": "gammarer.aws-ec2-instance-running-scheduler-1.1.17.tar.gz",
"has_sig": false,
"md5_digest": "075fc888286c0a5f0fd1c8659597f004",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.8",
"size": 33115,
"upload_time": "2024-05-01T16:21:44",
"upload_time_iso_8601": "2024-05-01T16:21:44.551466Z",
"url": "https://files.pythonhosted.org/packages/a6/82/1811f8740fb04eb8cf3df33f2235b82b11c39e27d12bdbd04fb209a6436b/gammarer.aws-ec2-instance-running-scheduler-1.1.17.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-01 16:21:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gammarer",
"github_project": "aws-ec2-instance-running-scheduler",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "gammarer.aws-ec2-instance-running-scheduler"
}