Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gammarers/aws-ec2-instance-running-scheduler
https://github.com/gammarers/aws-ec2-instance-running-scheduler
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gammarers/aws-ec2-instance-running-scheduler
- Owner: gammarers
- License: apache-2.0
- Created: 2023-04-13T06:29:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-17T16:27:22.000Z (9 months ago)
- Last Synced: 2024-04-23T05:41:57.757Z (9 months ago)
- Language: TypeScript
- Size: 1.53 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![GitHub](https://img.shields.io/github/license/yicr/aws-ec2-instance-running-scheduler?style=flat-square)](https://github.com/yicr/aws-ec2-instance-running-scheduler/blob/main/LICENSE)
[![npm (scoped)](https://img.shields.io/npm/v/@gammarer/aws-ec2-instance-running-scheduler?style=flat-square)](https://www.npmjs.com/package/@gammarer/aws-ec2-instance-running-scheduler)
[![PyPI](https://img.shields.io/pypi/v/gammarer.aws-ec2-instance-running-scheduler?style=flat-square)](https://pypi.org/project/gammarer.aws-ec2-instance-running-scheduler/)
[![Nuget](https://img.shields.io/nuget/v/Gammarer.CDK.AWS.Ec2InstanceRunningScheduler?style=flat-square)](https://www.nuget.org/packages/Gammarer.CDK.AWS.Ec2InstanceRunningScheduler/)
[![Sonatype Nexus (Releases)](https://img.shields.io/nexus/r/com.gammarer/aws-ec2-instance-running-scheduler?server=https%3A%2F%2Fs01.oss.sonatype.org%2F&style=flat-square)](https://s01.oss.sonatype.org/content/repositories/releases/com/gammarer/aws-ec2-instance-running-scheduler/)
[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/yicr/aws-ec2-instance-running-scheduler/release.yml?branch=main&label=release&style=flat-square)](https://github.com/yicr/aws-ec2-instance-running-scheduler/actions/workflows/release.yml)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/yicr/aws-ec2-instance-running-scheduler?sort=semver&style=flat-square)](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
com.gammarer
aws-ec2-instance-running-scheduler```
## Example
```typescript
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.