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