EC2 - Purchasing Options Flashcards
Understand the different purchasing options for EC2 Instances
List all available EC2 Instance purchasing options
On Demand
Reserved Instance
Convertible Reserved Instance
Savings Plans
Spot Instances
Dedicated Hosts
Dedicated Instances
Capacity Reservations
What use cases would On-Demand Instances be useful for?
Short-term and un-interrupted workloads, where you cannot predict how the application will behave
What are the billing options for On-Demand Instances?
Linux or Windows are billed per second after the first minute.
All other OS’s are billed per hour
What purchasing option has the highest cost but no upfront payment?
On Demand
Is there a long-term commitment for On Demand Instances?
No. You only pay for what you use.
How are Reserved Instances priced in comparison to On Demand?
They are heavily discounted. Can be up to 72%
What are the instance attributes that are reserved for Reserved Instances?
Instance Type (e.g. General purpose, compute optimised)
Region
Tenancy (Host, Dedicated, Default)
OS
What is the reservation period for Reserved Instances?
1 or 3 years. 3 years have a greater discount applied.
What are the payment options for Reserved Instances?
No upfront, partially upfront and all upfront. With greater discounts being applied based on how large of an upfront payment there is.
What use cases are Reserved Instances recommended for?
They are recommended long workloads and steady-state usage applications e.g. databases
What is the name of the marketplace where you can buy and sell Reserved Instances?
Reserved Instance Marketplace
What two ways does a Convertible Reserved Instance differ from a standard RI?
- You can change the EC2 Instance type, family, OS, scope and tenancy.
- You get less of a discount (up to 66% compared to On-Demand). This is because of the additional flexibility.
What are the scopes you can set for a Reserved Instance?
Regional or Zonal (Reserve capacity in an AZ)
How are EC2 Savings Plans discounted?
They are discounted based on long term usage (up to 72% compared to On-Demand)
Which purchasing option requires you to commit to a certain type of usage? (e.g. $10/hour for 1 year)
Savings Plans
At what price will any usage beyond the limit for the Savings Plans be set to?
Any additional usage will be billed at the On Demand price
What two instance attributes are locked for EC2 Savings Plans?
- Instance family (e.g. M5)
- Region
What three instance attributes are flexible for EC2 Savings Plans?
- Instance Size (e.g. m5xlarge, m5.2xlarge)
- OS (e.g. Linux, Windows)
Tenancy (host, Dedicated, Default)
What Purchasing Option has the highest discount in comparison to On-Demand?
Spot Instances (up to 90%)
What must you set for Spot Instances?
A max price
Why might your Spot Instance be stopped or terminated? And how long is the grace period?
If the max price is less than the current spot price.
The grace period is 2 minutes.
What is the most cost efficient Instance purchasing option?
Spot Instances
What workloads are Spot Instances useful for? Provide some examples
Useful for workloads that are resilient to failure. Examples are:
Batch jobs
Data analysis
Image processing
Any distributed workloads
Workloads with a flexible start and end time
What use cases are NOT suitable for Spot Instances?
Not suitable for critical jobs or databases
Which purchasing option provides a physical server with EC2 instance capacity fully dedicated to your use?
Dedicated Hosts
What are the two problems that Dedicated Hosts solve
- Compliance requirements i.e. companies that have strong regulatory or compliance needs
- Allows companies to use existing server-bound software licenses (per-socket, per-core, per-VM software licenses)
What are the purchasing options for dedicated hosts?
On-Demand - Pay per second for active Dedicated Host
Reserved - 1 or 3 years ( No Upfront, Partial Upfront, All Upfront)
What is the most expensive purchasing option and why?
Dedicated Hosts because you are renting out a physical server that is reserved for your company’s use only.
How does Dedicated Instances differ from Dedicated Hosts?
- Instances run on hardware that’s dedicated to you and not the entire server.
Can you control the instance placement for dedicated instances?
No
True or False? For Dedicated instances, you may share hardware with other instances in the same account?
True
What is Capacity Reservation?
Where you reserve On-Demand instance capacity in a specific AZ for any duration
True or False? You always have access to EC2 Capacity Reservations whenever you need it
True. You can reserve the capacity for any duration
True or False? There is a specific time commitment set for EC2 Capacity Reservations.
False. There is no time commitment and you can create/cancel instances within the capacity stated at any time.
At what price point are you charged for EC2 Capacity Reservations?
Charged at On-Demand rate whether you run instances or not. No billing discounts.
How can you gain billing discounts for Capacity reservations?
Combine with reserved instances and savings plans as capacity reservations are not discounted.
What use cases are Capacity Reservations suitable for?
Suitable for short-term, uninterrupted workloads that need to be in a specific AZ.
How frequently does the spot price vary and why?
Varies hourly and this is due to capacity
What is included in the Spot request when trying to create Spot Instances? List 5
Maximum price
Desired number of instances
Launch specification
When the request is valid from/until
Request type (one-time or persistent)
When can you cancel Spot Instance requests?
When the request is either open, active or disabled
Why must you cancel a spot request before terminating the spot instance?
If the spot request is set to persistent, more spot instances will be created to replace the ones that were terminated based on the desired number of instances set.
What are spot fleets?
They are set of spot instances as well as optional on-demand instances. It will try to meet the target capacity based on the price constraints that are set.
What are defined by the admin for the launch pools?
The instance type, OS, availability zone
True or False? You can have multiple launch pools. (Give a reason)
True. This is so the spot fleet can choose the most appropriate launch pool based on the allocation strategy.
When do spot fleets stop launching instances?
Whenever the instance capacity or max price is reached.
What are the different spot fleet allocation strategies and their benefits?
LowestPrice: Allocated from the pool with the lowest price (best for cost optimisation and short workloads)
Diversified: Distributed across all defined pools (great for availability and long workloads)
CapacityOptimised: Pool with the optimal capacity for the number of instances
PriceCapacityOptimised (recommended for most workloads): Pools with the highest capacity available, then select the pool with the lowest price.
What are the benefits of using a spot fleet over a spot request?
Can get extra savings based on the allocation strategy set