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-1.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b18e1a5a5b2919f1869d263cef52188d685ae2b3f6f5db825acc1d71c842c79f |
|
MD5 | dbfd79eb6d1d72f2e5b2dd1f46e3fe66 |
|
BLAKE2b-256 | e14d9d53d14ea1c871385544ae59330620416a7bca8a1e29b9726bddf947243d |
Close
Hashes for gammarer.aws_ec2_instance_running_scheduler-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 900eb3ee8be4ec2262b42304e32310aec2d9b6b28c6309ee5e5e0f82f2518640 |
|
MD5 | 5e4b5fa5cdf63fa9136c384d43d946b8 |
|
BLAKE2b-256 | 02d5c9a29f37d60f9dc29158a9bde4ffd0992cf6fec7a771cbc3d744880bb6e0 |