Skip to content
Menu
myCloud myCloud

Personal short notes about Cloud

  • XMPie
  • AWS
    • AWS Topics
    • AWS Architecture
    • AWS CLI
    • AWS Health
    • AWS Policies
    • AWS Cost
  • CHEAT SHEETS
myCloud myCloud

Personal short notes about Cloud

AWS CLI – Instance Scheduler

By mikado on September 30, 2022September 30, 2022

Credentials

  • Must have CLI access
  • lambda:InvokeFunction permission
  • cloudformation:DescribeStackResource permission

Logs

Requests and responses for the scheduler CLI are logged in the AdminCliRequestHandler-yyyymmdd log stream

Install Scheduler CLI

curl "https://s3.amazonaws.com/solutions-reference/aws-instance-scheduler/latest/scheduler-cli.zip" -o "scheduler-cli.zip"

unzip scheduler-cli.zip

sudo python setup.py install

Accouter issues:

sudo pip3 install --upgrade --force-reinstall setuptools
sudo python3 setup.py install

Command structure

scheduler-cli <command> <arguments>

schedule-cli --version

Create a period to start instances based on a schedule

A Period defines the duration when the instance should run

scheduler-cli create-period --stack Instance-Scheduler-MIKA --region us-east-1 --name MikaPeriod-01 --begintime 17:20 --endtime 17:25 --weekdays mon-fri

Create a schedule for the period

Each schedule must contain at least 1 period – that defines the time the instance should run.

scheduler-cli create-schedule --stack Instance-Scheduler-MIKA --name MikaSchedule-01 --region us-east-1 --periods MikaPeriod-01 --timezone UTC

https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/scheduler-cli.html

Category: AWS Topics

Categories

  • AWS (4)
  • AWS Architecture (8)
  • AWS CLI (5)
  • AWS Cost (3)
  • AWS Health (4)
  • AWS Policies (2)
  • AWS Topics (24)
  • CHEAT SHEETS (16)
  • Container (21)
  • Datadog (4)
  • Jenkins (2)
  • Linux (9)
  • Microsoft (7)
  • Python (1)
  • SCRIPTS (9)
  • Terraform (5)
  • XMPie (6)
©2025 myCloud
Click to Copy