Here are similar scripts to start/stop instances on EC2 - I use them for the same purposes, to start/stop a development instance.
http://www.rassoc.com/gregr/weblog/2016/02/10/pythonista-scripts-for-ec2/
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.