+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
#webdev #devops #automation #aws
100 days of Cloud- Day Six
Follow Me on Twitter
Tweet This Blog – Read on GitHub – Read On iCTPro.co.nz
Using Instance scheduler you can start and stop instance automatically using Cloud formation
curl "https://s3.amazonaws.com/solutions-reference/aws-instance-scheduler/latest/scheduler-cli.zip" -o "scheduler-cli.zip"
Unzip
unzip scheduler-cli.zip
Install
sudo python setup.py install
Check
scheduler-cli --version
Launch Solution , or download template
Comments | ScreenShots |
---|---|
Click on to Launch Solution | ![]() |
Enter Stack Name | ![]() |
Choose your frequency (in Mins) | ![]() |
Enable CloudWatch Logs | ![]() |
Start & Stop tag | ![]() |
keep everything default and acknowledge then click create stack | ![]() |
Go to instance and paste this script
scheduler-cli create-period --stack Ec2instanceScheduler --region ap-southeast-2 --name mon-fri-9-5 --begintime 9:00 --endtime 16:59 --weekdays mon-fri
Here i am setting up to start time 9 am and stop time 4.59 Pm from Monday to Friday.
Now go to AWS Console and open the DynamoDB.
Click on to Tables and choose the config table .
Then Choose the Items , and check for QuickPeriod appears under Name.
Each schedule must contain at least one schedule period, it defines the time instance should run.
SSH into ec2
scheduler-cli create-schedule --stack Ec2Stopinator --name QuickSchedule --region ap-southeast-2 --periods QuickPeriod --timezone PST
goto the DynamoDB.
Click on to Tables and choose the config table .
Then Choose the Items , and check for QuickSchedule appears under Name.
Now got to ec2 and select Manage tags
Key = Schedule
Value = QuickSchedule
Congratulations
you have successfully configured STOPINATOR
ICT professional who is highly enthusiastic about Cloud technologies and Information Security.