EC2 Flashcards
What is EC2?
Elastic Compute Cloud. It provides resizable capacity in the cloud. Can scale capacity up and down. Only pay for capacity you use.
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.
Also can be purchased as a reservation for up to 70% off on demand price.
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
What is the EC2 Savings Plan?
A feature of AWS that allows you to save up to 72% on EC2. You must commit for 1-3 years. It is super flexible and includes other serverless tech such as Lambda and Fargate.
How can I add storage volumes on EC2?
Use EBS (Elastic Block Store) volumes.
How can you add metadata to an EC2 instance?
Use tags
How to launch an encrypted EBS-backed EC2 instance from an unencrypted AMI?
Create an encrypted copy of the AMI. Then use that AMI to launch the EC2 instance.
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 an EC2 Spot Instance Pool?
Set of unused EC2 instances. They will all have the same instance type, operating system, AZ, and network platform.
Describe the 3 allocation strategies for Spot Instances
Lowest Price
- Default
- Spot Instances come from pool with lowest price
Diversified
- Spot instances come from across all different pools (distributed)
CapacityOptimized
- from pool w/ optimal capacity
Can you copy an AMI from one region to another?
Yes, but there will be a transfer charge