EC2 Fundamentals Flashcards
Spot Instances
the hotel allows people to bid for empty rooms, highest bidder keeps room, you can get kicked out any time.
Spot Instances are good for short workloads and are the cheapest EC2 Purchasing Options, but the least reliable. Provide the biggest discount but are not suitable for critical jobs.
most cost efficient, can get a discount of up to 90% compared to On-demand
Instances that you can “lose” at any point of time if your max price is less than current spot price.
Not suitable for critical jobs or databases.
Useful for workloads that are resilient to failure:
1) batch jobs
2) data analysis
3) image processing
4)distributed workloads
5) workloads with flexible start and end time.
Security Groups
Control traffic in and out of EC2 instances. can be attached to multiple EC2 instances.
EC2 Reserved Instances
like planning ahead, and if we plan to stay for long time we may get a good discount.
- Up to 72% discount compared to On-demand
- You reserve a specific instance attributes (Instance Type, Region,Tenancy, OS)
- Reservation Period – 1 year (+discount) or 3 years (+++discount)
- Payment Options – No Upfront (+), Par tial Upfront (++), All Upfront (+++) * Reserved Instance’s Scope – Regional or Zonal (reserve capacity in an AZ)
- Recommended for steady-state usage applications (think database)
- You can buy and sell in the Reserved Instance Marketplace
Convertible Reserved instance
- Convertible Reserved Instance
- Can change the EC2 instance type, instance family, OS, scope and tenancy * Up to 66% discount
Compute Optimized Instance
- Great for compute-intensive tasks that require high performance processors:
- Batch processing workloads
- Media transcoding
- High performance web servers
- High performance computing (HPC)
- Scientific modeling & machine learning
- Dedicated gaming servers
EC2 User Data
is used to bootstrap your EC2 instances using a bash script. The script can contain commands such as installing software/packages, download files from the internet or anything you want.
Memory Optimized Instance
Fast performance for workloads that process large data sets in memory
* Use cases:
* High performance, relational/non-relational databases
* Distributed web scale cache stores
* In-memory databases optimized for BI (business intelligence)
* Applications performing real-time processing of big unstructured data
Storage Optimized Instance
Great for storage-intensive tasks that require high, sequential read and write access to large data sets on local storage
* Use cases:
* High frequency online transaction processing (OLTP) systems
* Relational & NoSQL databases
* Cache for in-memory databases (for example, Redis)
* Data warehousing applications
* Distributed file systems
Dedicated Host Instances
we book an entire building of the resort.
A physical server with EC2 instance capacity fully dedicated to your use
* Allows you address compliance requirements and use your existing server- bound software licenses (per-socket, per-core, pe—VM software licenses)
* Purchasing Options:
* On-demand – pay per second for active Dedicated Host
* Reserved - 1 or 3 years (No Upfront, Partial Upfront,All Upfront)
* The most expensive option
* Useful for software that have complicated licensing model (BYOL – Bring Your
Own License)
* Or for companies that have strong regulatory or compliance needs
Spot Fleet
Set of spot instances and optionally on-demand instances. it allows you to automatically request spot instances with the lowest price.
spot fleet will try to meet the target capacity with price constraints:
1) define possible launch pools. instance type, OS, AZ
2) can have multiple launch pools, so that the fleet can choose
3)spot fleet stops launching instances when reaching capacity or max cost.
Strategies to allocate Spot instances:
1) lowest price: from the pool with lowest price.
2) diversified: distributed across all pools that you define (great for availability, long workloads
3) capacity optimized: pool with the optimal capacity for the number of instances
4) Price Capacity Optimized: pools with highest capacity available, then select the pool with the lowest price (best choice for most workloads).
General Purpose Instance
1)Great for Diversity of workloads such as web servers or code repositories. 2) Balance Between Compute, memory and networking.
Security Groups
Firewalls. Control how traffic is allowed into or out of EC2 Instances. Regulate access to ports and authorized IP ranges.
Can be attached to multiple instances.
Locked down to a region/VPC combination
Does live “outside” the EC2- if traffic is blocked the EC2 instance won’t see it.
Port 22
SSH (Secure Shell)- log into a Linux Instance
SFTP (Secure File Transfer Protocol)- Upload files using SSH
Port 21
FTP (File Transfer Protocol)- Upload files into a file share
Port 80
HTTP- access unsecured websites.