Skip to main content

AWS EC2 Instance Running Scheduler

Project description

GitHub npm (scoped) PyPI

Sonatype Nexus (Releases) GitHub Workflow Status (branch) GitHub release (latest SemVer)

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

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

File details

Details for the file gammarer.aws-ec2-instance-running-scheduler-0.5.4.tar.gz.

File metadata

File hashes

Hashes for gammarer.aws-ec2-instance-running-scheduler-0.5.4.tar.gz
Algorithm Hash digest
SHA256 3d0edee2bd29cf5b29d2420720d5376947ab108d1d66d9ac17b7d35e0e1c2648
MD5 dfe74d1bcc4b2699588da0fa7da61c9f
BLAKE2b-256 e4d274a064766f099607fc4d0c5d20118b74a9306bad1b40d63a32aae330691d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gammarer.aws_ec2_instance_running_scheduler-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6a71179c9132511ab30d10b89523924517998a957052cf37514b6703c2fa6810
MD5 be46dac3f804552c98bd7373165723fb
BLAKE2b-256 a482f037a5336b7893c55d48c916421188bc7ea54ff268b75782eb282c4da872

See more details on using hashes here.

Supported by

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