AWS BOTO3 on iPhone


A few days ago I was on a trip (You can read about it here), and I got hit with an email from my availability monitor that my blog is down.

I didn’t have my laptop with me, I host the blog on AWS and I use AutoScale groups for EC2 hosts to deploy my blog.

Doing host recycling (by scaling up the number of hosts and destroying old hosts) would be a quick solution to have a fresh installation that works, I have a python script ready for that so all I need is to execute it and in 20 seconds my blog can just come back to live (maybe a little more than 20 seconds)

The fact that I didn’t have my laptop resulted in my website being down for the whole week, I wanted to make it easy to do such quick fixes on the run from my phone and started looking for a solution

I was thinking of running an EC2 instance that I can SSH into it and have scripts available to execute for such quick fixes, that will come with the cost of an extra host running 24/7 just to be used for a few seconds every now and then, not a cost-efficient solution at all.

After a little digging and searching on Google, I found this cool tutorial that I followed to install Pythonista, and Stash and configure credentials for my AWS account.

Won’t be repetitive here and copy-paste from the tutorial, but I will mention that to keep my script up-to-date and under version control and also to avoid doing any touch screen coding (which is something I don’t like at all) I’ve also installed an App called work-copy, It allows me to clone the script from GitHub and open it using Pythonista and then I can easily fix such quick operations tasks on the run when needed.

If you happen to know a better solution, let me know, would love to try and discuss it.


Leave a Reply

Your email address will not be published. Required fields are marked *