Skip to main content

AWS EC2 Instance Running Scheduler

Project description

GitHub npm (scoped) PyPI Nuget GitHub Workflow Status (branch) GitHub release (latest SemVer)

AWS EC2 Instance Running Schedule Stack

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
  • Step Functions State machine
  • Step Functions State machine role

Install

TypeScript

install by npm

npm install @gammarer/aws-ec2-instance-running-schedule-stack

install by yarn

yarn add @gammarer/aws-ec2-instance-running-schedule-stack

Python

pip install gammarer.aws-ec2-instance-running-schedule-stack

C# / .NET

dotnet add package Gammarer.CDK.AWS.Ec2InstanceRunningScheduler

Example

import { Ec2InstanceRunningScheduleStack } from '@gammarer/aws-ec2-instance-running-schedule-stack';

new EC2InstanceRunningScheduleStack(app, 'EC2InstanceRunningScheduleStack', {
  targetResource: {
    tagKey: 'WorkHoursRunning',
    tagValues: ['YES'],
  },
  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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file gammarer_aws_ec2_instance_running_scheduler-2.0.0.tar.gz.

File metadata

File hashes

Hashes for gammarer_aws_ec2_instance_running_scheduler-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8d6b3569958016e6f4e3d10207c4d96c9961cec4c59452af6b78fc20d24f2d3d
MD5 44462d2741b30793decd7ad90a80d068
BLAKE2b-256 f63adf36059ebe188281059258f0099aeed10762d870c47642d2cbf840087ccb

See more details on using hashes here.

File details

Details for the file gammarer.aws_ec2_instance_running_scheduler-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gammarer.aws_ec2_instance_running_scheduler-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e834088647cf56ace8b9b2b3d654315ac21a1d5b1d0bced85305cf09f1e1fa8
MD5 169e39b653d3e954303320573cca93ec
BLAKE2b-256 656df7e95dcf1281ed0206c11b4abf10d62aa67569d10345a1590e2764a3695f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page