如何最好地让许多用户控制 EC2 实例?
摘要: 如何让多个开发人员能够启动和停止共享 Amazon EC2 实例?
我有一个项目,其中使用 EC2 实例进行日复一日的工作,因此我在进入办公室时“启动”我的服务器,在离开办公室时“停止”它。我与其他几位开发人员合作,我们都使用这个 EC2 实例。我们希望每天第一个开始工作的人“启动”实例,最后一个回家的人“停止”实例……但他们无法“启动”或“停止”我的实例。 (如果我授予他们启动权限,他们可以从我的 AMI 启动其他实例,但这将是一个新实例。这个特定实例是一个具有昨天状态的持久机器。 )
我们都在一个综合计费帐户上,但这没有提供访问权限。我正在考虑 Amazon IAM,但它似乎需要对我们当前的用户设置进行彻底检查(1 个开发人员 = 1 个 AWS 帐户,所有帐户都在合并计费下),如果它不起作用,或者如果有实现相同目标的更好方法。 (坦率地说,我还没有让我的玩具脚本在 IAM 下工作,尽管我怀疑 IAM 是解决这个问题的正确方法 - 我需要更多地了解它)
关于如何最好地管理共享实例有什么建议吗?
谢谢!
PS 由于各种原因,我们不想有一个基于 cron 的解决方案;如果我们都带着笔记本电脑移动并且没有固定的基础设施,那么该计算机将在哪台机器上运行?我们假设哪个时区? cronjob 以哪个用户身份运行?
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 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
AWS 身份和访问管理:http://aws.amazon.com/iam/
AWS Identity and Access Management: http://aws.amazon.com/iam/
使用单独的帐户进行生产和开发。将开发帐户登录信息分发给每个开发人员。他们可以从主 AWS 管理控制台启动/停止 EC2 实例。
如果您需要管理控制台之外的解决方案,请使用可在本地运行以启动/停止实例的 EC2 API 创建一个小型应用程序。
像 Elasticfox 这样的应用程序也可能是一个可行的解决方案。
这些都是简单的想法。
编辑:2011 年 2 月 14 日 AWS 宣布 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.