如何测试创建 ec2 实例的脚本而不实际创建它?
我正在编写 ec2 实例的创建和操作脚本。在测试过程中,除了我实际启动实例之外,一切都很好,从长远来看,这相当昂贵。
我一直在寻找一个测试终点,可以验证我所做的调用的语法是否正确,但我一直找不到。
有什么方法可以发送 ec2 api 请求(例如运行新实例)并在不实际启动实例的情况下获取响应?
I am scripting creation and manipulation of an ec2 instance. During testing all is well except that I actually launch the instance, which fairly costly in the long run.
I have been searching for a test end point where I can verify that syntax of the call I make is ok, but I have not been able to find one.
Is there any way I can send ec2 api requests, for instance running new instances, and get responses without actually launching the instance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我看到了几种方法。我认为最便宜的是(正如 @stivlo 建议的那样)运行免费实例之一。
也许有点矫枉过正,但您可以运行本地版本的 Eucalyptus 进行测试。如需了解更多信息,请访问 http://open.eucalyptus.com/。当我查看它时(大约 6-9 个月前),它与 ec2 工具一起使用。
第三个(可能是最合适的)是编写一个停止/终止 ec2 实例的脚本。这样你就可以启动一个,当它被确认时将其关闭。所涉及的成本将是便士。
I see a few ways. The cheapest I think is (as @stivlo suggested) run up one of the free instances.
Maybe a bit overkill but you could run a local version of Eucalyptus for testing. See more at http://open.eucalyptus.com/. When I looked at it (about 6-9 months ago) it worked with the ec2 tools
The third (and possibly most suitable) is write a script that stops\terminates an ec2 instance. That way you run one up, when it's been confirmed turn it off. The cost involved would be pence.