AWS EC2 Instance Running Scheduler
Project description
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
npm install @gammarer/aws-ec2-instance-running-scheduler
# or
yarn add @gammarer/aws-ec2-instance-running-scheduler
Python
pip install gammarer.aws-ec2-instance-running-scheduler
C# / .NET
dotnet add package Gammarer.CDK.AWS.Ec2InstanceRunningScheduler
Java
Add the following to pom.xml:
<dependency>
<groupId>com.gammarer</groupId>
<artifactId>aws-ec2-instance-running-scheduler</artifactId>
</dependency>
Example
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for gammarer.aws-ec2-instance-running-scheduler-0.7.15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 111b72d32f7d314a5daf4dbe9040691ea35f876fe01c0f1f5e42c72c5892b50e |
|
MD5 | dbe79c82037c12d32a83dc250d85748c |
|
BLAKE2b-256 | 66c8777a136f3d26260e54effbc4e566b34aa1415c5ca715cd7d05ce290f2d28 |
Close
Hashes for gammarer.aws_ec2_instance_running_scheduler-0.7.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f3eda110c2cb75cfe1ac14d0fa278a006b7a33c8e4b16b5c7d4e25364c1c784 |
|
MD5 | 935e4f4b9f12d35030b4a5b11538d056 |
|
BLAKE2b-256 | 5a4aef3e5a4a0529bced49569fa47a63f3aaea1cd8b25cdbc01b2b0686193177 |