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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14c5818632aa1d714a3efa6d9a76e1820f214cced2a65512e672f869d6da44b5 |
|
MD5 | 19835cfca91025c360720edebedb0967 |
|
BLAKE2b-256 | da0ca3467099f0f153e4fa98f00f1ac52964f0390b919a67f8975bf0ebfeda79 |
Close
Hashes for gammarer.aws_ec2_instance_running_scheduler-0.7.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f38f623f139f2ef0649b7aa508e3a218d5a16a73fb0ef1e062c82329b92303c |
|
MD5 | cc5c729e98843dedee55653c0095b392 |
|
BLAKE2b-256 | 69088a9e3c4587a60873700db6e17c09e839a962e36dd36333ca827e3f9d6e93 |