How best to have many users control EC2 instances?
Summary: How can I get several developers to be able to start and stop a shared Amazon EC2 instance?
I've got a project where I'm using an EC2 instance for work that persists from day to day, so I 'start' my server when I come into the office, and 'stop' it when I leave. I work with several other developers and we all use this EC2 instance. We'd like the first person to start work each day to 'start' the instance, and the last home to 'stop' the instance ... but they can't 'start' or 'stop' my instance. (They can launch other instances from my AMI if I give them launch permission, but that would be a new instance. This particular instance is a persistent machine with state from yesterday.)
We are all on a consolidated billing account, but this gives no access rights. I'm looking开发者_C百科 at Amazon IAM, but it seems it needs an overhaul of our current user setup (1 developer = 1 AWS account, all account under consolidated billing) which would be very disruptive if it doesn't work, or if there's a better way to achieve the same goal. (And frankly, I've not got my toy script to work yet under IAM either, though I suspect IAM is the correct way to approach this problem - I need to read about it more)
Any suggestions for how best to manage shared instances?
Thanks!
PS For various reasons, we don't want to have a cron based solution; which machine would that run on if we're all mobile with laptops and have no fixed infrastructure? Which timezone are we assuming? Which user is the cronjob running as?
AWS Identity and Access Management: http://aws.amazon.com/iam/
Use separate accounts for production and development. Distribute the development account login info to each developer. They can start/stop EC2 instances from the main AWS Management Console.
If you want a solution outside of the management console, create a small application using the EC2 APIs that can run locally to start/stop the instance.
An application like Elasticfox might be a viable solution too.
These are the simple ideas.
EDIT: On Feb 14, 2011 AWS announced that IAM users can login to the management console.
精彩评论