Amazon EC2 预留实例能否与 AWS Elastic Beanstalk 中的自动扩展一起使用? [英] Can Amazon EC2 reserved instances be used with auto-scaling in AWS Elastic Beanstalk?
问题描述
据我所知,AWS Elastic Beanstalk 将允许您设置自动扩展,这意味着您可以在一夜之间使用微实例,并在白天自动扩展.如果这样做,您是否仍然可以利用预留的 EC2 实例定价?
更新(2013 年 9 月)
AWS 刚刚宣布支持 Modify EC2 Reserved Instance Reservations,删除了之前的两个限制(我已经相应地更新了我的初始答案):
<块引用>今天,我们通过以下方式使预留实例模型更加灵活赋予您修改预留实例 (RI) 的权力您的需求会发生变化.您现在可以在可用性之间移动您的 RI区域,只要您留在同一区域内.如果您的 AWS 账户为 EC2-Classic 启用,您还可以在EC2-Classic 和 EC2-VPC.您现在可以调整您的预留根据您的需求和架构变化创建实例.
<小时>
初始答案(更新)
<块引用>如果这样做,您仍然可以利用预留的 EC2 实例定价吗?
当然,Amazon EC2 预留实例计费和使用是透明处理的,即 AWS 只需应用您的预留实例定价,只要您有可用的预留实例与您正在运行的实例按类型、区域和可用区匹配,请参阅以下常见问题以了解详细信息:
- 如何控制按预留实例费率计费的实例?
RunInstances 命令不区分按需实例和预留实例.在计算您的账单时,我们的系统会自动优化以较低预留实例费率收费的实例,以确保您始终支付最低金额.
注意有关如何匹配来自该虚拟池的实例的限制,例如:
我为特定实例类型购买的预留实例可以吗(即高 CPU 超大实例)应用于我正在运行的不同实例类型(即标准大实例)?
不可以.每个预留实例都与特定的实例类型相关联,并且只能在预留实例期限内应用于该实例类型.我可以将预留实例从一个区域移动到另一个区域吗?
不可以.每个预留实例都与一个特定区域相关联,该区域在预留实例的生命周期内是固定的,不能更改.按顺序启动实例时是否需要指定可用区使用我的预留实例?
是的.购买预留实例时,您可以指定要在其中预留该实例的可用区.为了使用该预留实例,您需要确保在同一个可用区中启动您的实例.[...]
在未明确指定可用区的情况下启动实例时,后者很容易被忽略,这将依次产生一个随机可用区.
As far as I understand AWS Elastic Beanstalk will allow you to set auto-scaling, which means that you can use a micro-instance overnight, say, and auto-scale up during the day. Can you still take advantage of reserved EC2 instance pricing if you do this?
Update (Sept 2013)
AWS has just announced support to Modify EC2 Reserved Instance Reservations, which removes two of the former restrictions (I've updated my initial answer accordingly):
Today we are making the Reserved Instance model even more flexible by giving you the power to modify your Reserved Instances (RI's) when your needs change. You can now move your RI's between Availability Zones as long as you stay within the same Region. If your AWS account is enabled for EC2-Classic, you can also move your RI's between EC2-Classic and EC2-VPC. You can now make adjustments to your Reserved Instances as your needs and your architecture change.
Initial Answer (updated)
Can you still take advantage of reserved EC2 instance pricing if you do this?
Absolutely, Amazon EC2 reserved instance billing and usage is handled transparently, i.e. AWS simply applies your reserved instance pricing as long as you have reserved instances available matching your running ones by type, region and availability zone, see the following FAQs for details:
- How do I control which instances are billed at the Reserved Instance rate?
The RunInstances command does not distinguish between On-Demand and Reserved Instances. When computing your bill, our system will automatically optimize which instances are charged at the lower Reserved Instance rate to ensure you always pay the lowest amount.
Beware of the restrictions regarding how instances from this virtual pool are matched though, e.g.:
Can a Reserved Instance that I’ve bought for a particular instance type (i.e. High-CPU Extra Large Instance) be applied to a different instance type that I am running (i.e. Standard Large Instance)?
No. Each Reserved Instance is associated with a specific instance type, and can only be applied to that instance type for the duration of the Reserved Instance term.Can I move a Reserved Instance from one Region to another?
No. Each Reserved Instance is associated with a specific Region that is fixed for the lifetime of the Reserved Instance and cannot be changed.Do I need to specify an Availability Zone when I launch my instances in order to take advantage of my Reserved Instances?
Yes. When you purchase a Reserved Instance you specify the Availability Zone in which you want to reserve that instance. In order to use that Reserved Instance, you need to ensure that you launch your instance in that same Availability Zone. [...]
The latter is easily overlooked when starting instances without explicitly specifying an availability zone, which will yield a random one in turn.
这篇关于Amazon EC2 预留实例能否与 AWS Elastic Beanstalk 中的自动扩展一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!