EC2 Flashcards
Pricing of On Demand EC2 Server
Fixed rate by hour (or second) with no commitment
Good for apps with short term spiky or unpredictable workflows
Pricing of Reserved EC2 Server
Provide with capacity reservation getting a discount on hourly charge for instance.
Must set for 1-3 year terms
Reserved Instance EC2 types and % discount
Standard RI
- up to 72% discount
Convertible RI
- up to 54% off
- feature capability to change attributes of RIs as long as exchange is equal or greater value
Scheduled RI
- Available to launch within time window you reserve.
- Good for predictable schedule
What is a Spot Instance?
EC2 instance where you big price you want on instance capacity.
Great for apps with flexible start and end times
Up to 90% discount
Fluctuates based on supply and demand
Good for users w/ urgent need for large amounts of additional computing capacity
What are EC2 Dedicated Hosts?
Most expensive EC2 Server (physical server).
But, it can help reduce cost by allowing you to use existing server bound software.
Can be purchased on demand (hourly) but is really expensive
Also can be purchased as a reservation for up to 70% off on demand price.
What happens if your spot instance is terminated by EC2 half-way through the hour?
You will not be charged for a partial hour of usage
What happens if you terminate a spot instance yourself (cost-wise)?
You will be charged for any hour in which the instance ran
TRUE or FALSE: You can encrypt the root device volume?
TRUE
TRUE or FALSE: Termination protection is enabled by default on EC2?
FALSE, must turn it on yourself
What is default action of root EBS volume when EC2 instance is terminated?
Root volume is deleted, but other EBS volumes are NOT deleted
What are the underlying hypervisors for EC2?
Zen and Nitro
How can you access the private and public IP address of an EC2 Instance?
Use CURL or GET to access the instance metadata
URI: http://169.254.254/latest/meta-data/Instance
How can you add metadata to an EC2 instance?
Use tags
What is an EC2 Spot Fleet?
A group of Spot and optional On-Demand Instances. AWS will launch a number based on the specified target capacity. It will be fulfilled if the max price you picked exceeds current Spot Price.
What is a EC2 Spot Block?
Stop your EC2 instance form being terminated even if Spot price goes over you max Spot price.
What time interval can a Spot Block be set?
1-6 hours
What are EC2 Spot Instances used for?
Big data and analytics
Containerized Workloads
CI/CD testing
Web services
Image and media rendering
High Performance Computing (HPC)
What are EC2 Spot Instances NOT good for?
Persistent workloads
Critical jobs
Databases
What items do you specify in an EC2 Spot request
Max price
Desired # instances
Launch specs
Request type: one-time | persistent
One-time (request once)
As soon as spot price goes over max price the spot instance is ended
Persistent
When spot goes over max then keeps going though cycle
Valid from, Valid until
EC2 Spot Fleet Options
Capacity Optimized
Diversified
LowestPrices (default)
InstancePoolsToUseCount (spot instances distributed across a number of Spot Instance pools you specify. Param is valid only when used in-combination with lowestPrice
What is EC2 Hibernate?
Hibernate EC2 instance.
Saves contents of RAM to EBS root volume allows for faster reboot
Resume and keeps save instance ID
What is EC2 Hibernate useful for?
long-running processes
Servcies that take a long time to initialize
Size of RAM needed to perform EC2 hibernate
less than 150GB
Max amount of time an EC2 instance can be hibernated for?
60 days max
EC2 Instance types that can be hibernated
On-Demand
Reserved
EC2 instance families that can be hibernated
C, M, R 3-5
Perquisite of enabling hibernation on EC2 instance?
Root Volume must be ENCRYPTED