Can AWS Reserved Instances be used in OpsWorks?
If so, how? Any documentation would be great.
Thanks.
Yes, because a reserved instance is just a billing mechanism, not a specific machine - when you buy a reserved instance you are just agreeing ahead of time to pay a certain amount for a certain type of machine (whether you use it or not).
If you already have a reserved instance 'under contract' and have not yet spun it up, if you use Opsworks to spin it up, you will be charge your reserved price while that instance is running.
If you have 3 reserved instances, and you spin up 4 in Opsworks, you will be charge 3 instances at the reserved price, and one at the on demand price.
If you buy 5 reserved instances and only spin up 2 in Opsworks, you still are on the hook for all 5 reserved instances.
Related
Our organization has many EC2 on-demand instances. We never looked at the reserved instance pricing because we thought we had to pay up-front. But I see that now there are reserved instance with no up-front costs, but monthly.
This looks like what we need to keep costs down, but I am unclear as to how the reserved instance pricing is applied.
For example, we have 10 t3.medium ec2 instance. Let's say that there are 6 always running 24/7, but the other 4 are not running 24/7, they are turned off when not in use.
If I buy a reserved instance for t3.medium, how does AWS know to apply it to the instances running 24/7 and not part time?
For example, we have 10 t3.medium ec2 instance. Let's say that there
are 6 always running 24/7, but the other 4 are not running 24/7, they
are turned off when not in use.
If I buy a reserved instance for t3.medium, how does AWS know to apply
it to the instances running 24/7 and not part time?
Amazon doesn't apply reserved pricing to a specific instance at all. It basically just applies reserved pricing to your bill. It's like a discount at the time your bill is processed. If you have reserved pricing for N instances, and you have at least N instances running 24/7 reflected in your bill, then the reserved pricing gets applied to those N instances.
Amazon doesn't really care if you are running a single specific instance 24/7, or deleting and recreating instances once a minute. In the end it's just the total number of seconds you have a specific type of instance running each month that they care about, and bill you for.
Be aware that when you setup instance reservations it is actually a capacity reservation. You are telling Amazon you are committing to running this type of instance 24/7 for either 1 year or 3 years. By letting Amazon know this, it helps with their capacity planning, and in return they give you a cost discount. But it also means that they are going to charge you for that reserved capacity even if you don't actually have that instance running 24/7.
I have a regular AWS EC2 m3.large instance that I use for a few days a month, when I'm not using it I stop it, and just start it when I need it. I have the understanding that I only pay for it when it is actually running, is that correct ?
I've just recently noticed reserved instances, I'm happy to commit to a term of a few years, however I don't need to use it every day. So assuming my first assumption is correct does that also apply to reserved instances or do i have to pay every day whether or not Im using.
If is a good idea can I convert my existing instance to a reserved instance or do I have to setup a new machine from scratch ?
You have to pay for reserved instance even if you are not using it. The capacity is already reserved for it and you may have already paid a partial payment upfront for you or you can choose no upfront. Reserved instance is use it or lose it.
You can use a calculator and see if reserved instance can save you $$.
You can convert your on-demand to reserved instance just by reserving an instance of same type in the same availability zone. AWS has made the instance reservation more flexible recently but if you are running a single instance, just reserve an instance of same type in the same availability zone. You can choose partial/no upfront, one or three year terms.
In us-east-1, on-demand cost for m4.large is $0.10/hour.
Monthly on-demand cost is: $72/month
Approximate reserved instance (one year) cost with no upfront: $50/month
Number of on-demand hours for $50: 500 hours (20 days)
If you plan to run for less than 500 hours/month, then you should go for on-demand. Remember, with reserved instances you are guaranteed an instance by AWS. Sometimes, on-demand may run out of capacity and you have to choose a different instance type. It is very rare but happens sometimes.
If you "reserve" an instance you have to pay for it.
m3.large instances that you stop you do not have to pay for, but keep in mind you might have to pay for other things like the EBS volume attached.
Judging by what you've said, its sounds like it's cheaper to start/stop the instance when you need it.
We have 2 reserved c3.xlarge instance in our project but have total 3 launched c3.xlarge instance.
How to check which 2 instances are reserved out of 3. I checked details of all 3 instances, but nothing is mentioned.
Reserved or not reserved is just a billing convenience. There is no concept of a particular instance being reserved or not.
So for example if you have two instances and have purchased on reserved instance and one is 'on demand', you can delete either one of them, and one of them is still reserved.
To check your reserved instances:
login to your aws console.
Go to EC2 management page.
Expand Instances
Click on Reserved Instances
Here you can see all your available reserved instances if available, else "You do not have any Reserved Instances." is displayed.
I have right now AWS free tier instance. I purchased a m3.large reserved instance. Now how can i run and use this as i was using free tier instance .
I cant see any start/stop option for reserved instance.
Reserved instances are purely an accounting/billing thing. There is not a special way to "run" a reserved instance. Simply run an instance that matches the specifications of your reserved instance purchase and it will run at the reserved instance rate rather than the on-demand rate.
Basically AWS billing sees that you're running an instance for the hour. They check to see if there is a reserved instance purchased that matches the specifications of the running instance. If one is found, that hour is billed at the reserved rate. If one is not found, then you're charged at the on-demand rate.
We’ve purchased an Amazon Web Services (AWS) reserved instance for an Amazon Elastic Compute Cloud (EC2) instance that is critical to our infrastructure. This instance starts and stops every day at certain time interval.
I see that purchasing a reserved instance 'guarantees' that this instance will reliably start even when AWS is under heavy load, but is there any way to specifically tie this reserved instance to the instance we want to associate with it?
What happens if we add another instance that matches the exact criteria of the reserved instance we’ve purchased?
You don't need to worry or do anything in associating the instance and the purchased Reserved Instance; all those are done automatically by AWS.
The reserved Instance is purely a billing and cost related and it doesn't relate to the technology aspect of an EC2 instance. If any of your running instance matches with any of your purchased Reserved Instance then you benefit from the reduced costing. There isn't any commitment on the SLA or changes at the Instance level which involves Reserved Instance. The same case works when you have 2 reserved instances; if there 2 instances running in your account which matches your reserved instance purchase they the reduced cost would be applied.
Analogy - Super Market Coupon Offer
If the Offer Says, buy 2 units of Product A and get one Product B
absolutely Free. So you look into the offer and take 2 units of
Product A and one Unit of Product B. During the billing as well, the
Point of Sales Person also doesn't look into each and every product
and try to check it offers; rather he or she directly keeps scaning
each and every product against the bar-code scanner and that't it -
when these 3 are scanned, the price for Free-Product is automatically
reversed.
So similarly, you buy the Reserved Instance (Coupon) choosing the AMI,
Region, AZ, Duration etc. You would do all your tech stuff as usual
like deploying, patching, monitoring etc. During the billing, if the
instance(s) you launched matches the Reserved Instance, then the
Reserved pricing would be applied; if not that would be charged at
'On-Demand-Pricing'.
If there is a mismatch between what instance you are running and what instance you have reserved; you will not be using the benefit of Reserved-Instance pricing
and be charged with On-Demand-Pricing. Also you will be wasting the
investment done for the Reserved-Instance
As implied in Naveen's answer, there is no direct way to associate an instance with a reservation.
If you want the reliability, then you must launch instances with unique set of properties (instance type, az and AMI). There is no other way at the moment.
This is supposed to be a comment in Naveen's reply. But as I had no reputation yet to commen, I am adding it as an answer.