Ever forget to shut off that really large EC2 instance you were working with days ago? Or, 12 of them? Wonder how much that cost you? I often found myself in this situation while working with AWS. I wanted to avoid the console, and be able to stop and start instances from Alexa. I also wanted to know how much I spent for the month, and how that compared to previous months.

Cloud Admin lets you start and stop EC2 instances in any AWS region. You can check your bill, and compare that to previous months. You can check status of custom CloudWatch alarms. And, you can call Lambda functions that can do whatever you can dream.

The skill is written in Python and leverages STS, IAM, Lambda, and DynamoDB. It uses STS to assume a role in the caller's account, then execute in the caller's environment, but it's actually running in a dedicated account for Cloud Admin.

Authentication was the biggest challenge. I needed to enable Account Linking to get a user's token to assume the role. I also had to setup a website to help with setup, which used Login with Amazon. Finally, to pull it all together, I used a CloudFormation template to do the setup.

I think the next steps for Cloud Admin are some analytics related around billing. I have a few ideas of things I'd like to hear from there. Then, native support for more services like CloudFormation, DataPipeline, EMR, and so on.

Built With

Share this project: