AWS:How do I make my elastic beanstalk instance us

2020-04-26 03:19发布

问题:

So currently I have an application running on am m3.medium instance, its just an single instance running in EU/Ireland area.

If I go to EC2 and buy a reserved instance of m3.medium when will my Elastic beanstalk instance starting using it. Does it just happen or do I have to redeploy or do something else ?

回答1:

Once you reserve an instance type, AWS checks for running instances in the region/availability zone where you purchased the reserved instances and applies the discount from the moment you purchased the reserved instances.

For example, you have five m3.medium instances running and you purchased three reserved m3.medium instances, AWS will apply discounted rates for three instances and on-demand rates for two instances.

A region has multiple AZs: Regions and Availability Zones. AWS used to offer RIs in AZs, now they made it flexible by offering it in regions and you can convert the RIs. See: Amazon EC2 Convertible Reserved Instances and the Reserved Instance Regional Benefit

Capacity reservation is the capacity or the instance reserved for you. If you choose AZ based reservation, then capacity is guaranteed. ie., if you reserved a m4.large, you are guaranteed to get a m4.large for the entire reservation period - even if you stop the instance. Always a m4.large instance is set aside for you.

By choosing the region based reservation - which is flexible than the more rigid AZ based reservation - your capacity is not guaranteed. ie., if you reserved a m4.large, you are not guaranteed to get a m4.large for the entire reservation period - in case you stop the instance and start it after sometime or launch a new m4.large instance, your request can be denied because AWS may not have m4.large instance to fulfill your request.



回答2:

Your EC2 instance will start billing at the discounted price immediately. It "just happens" like you said. Reserved instances are just a billing construct. They are just a discount on your monthly bill. You don't have to assign the reservation to a specific EC2 instance or anything like that.



回答3:

Reserved Instances are more of a billing construct. If you have Reserved Capacity in an Availability Zone, you just need to provision your instance in that Availability Zone. If your Reserved Instance is set to Region, you just need to provision your instance in that region. When it comes to billing, it basically credits you for each instance that matches a reservation.

Check out How Do RIs Work for more information