EC2 Flashcards
different types of EC2 instances (7)
What are the 4 most important?
General Purpose, Compute Optimized, Memory Optimized, Storage Optimized, Accelerated Computing, Instance Feature, Measuring Instance Performance
What are the (3) parts of the AWS EC2 instance type naming convention:
m5:large
Instance class, generation, size within the instance class
EC2 Instance Type Great for a diversity of workloads such as web servers or code repositories
General Purpose
General Purpose EC2 Instance Type are great at balancing between ____________ (3)
Compute, Memory, Networking
EC2 Instance Type Great for compute-intensive tasks that require high performance processors
Compute Optimized
Which EC2 Instance Type would use the following:
Batch processing workloads, Media transcoding, High performance web servers, High performance computing (HPC), Scientific modeling & machine learning, Dedicated gaming servers
Compute Optimized EC2 Instance Type
EC2 Instance Type - Fast performance for workloads that process large data sets in memory
Memory Optimized
Which EC2 Instance Type would use the following:
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
Memory Optimized
EC2 Instance Type Great for storage-intensive tasks that require high, sequential read and write access to large data sets on local storage
Storage Optimized
Can Security Groups be attached to multiple instances
Yes
Security Groups are locked down to a ____________
region/VPC combination
For EC2, where does the Security Group live?
Outside of the EC2 (if traffic is blocked the EC2 instance won’t see it)
What is a good security group practice for SSH access?
to maintain a separate security group of SSH access
What is it if your application is not accessible (timeout)
it is a security group issue
What error is given if you have an application error or the EC2 is not launched?
connection refused
In EC2 security groups, All inbound traffic is _____________ by default
Blocked
EC2 security groups - All outbound traffic is ____________ by default
authorised
SSH (Secure Shell) - log into a Linux instance (Port)
22
FTP (File Transfer Protocol) – upload files into a file share (Port)
21
SFTP (Secure File Transfer Protocol) – upload files using SSH (Port)
22
HTTP – access unsecured websites (Port)
80
HTTPS – access secured websites (Port)
443
General Purpose EC2 Instance Type are great at balancing between ____________ (3)
Compute
Memory
Networking
EC2 Instances Purchasing Options (7)
On-Demand Instances
Reserved
Savings Plans
Spot Instances
Dedicated Hosts
Dedicated Instances
Capacity Reservations
EC2 Instances Purchasing Options - short workload, predictable pricing, pay by second
On-Demand Instances
EC2 Instances Purchasing Options - (1 & 3 years)
* long workloads
* long workloads with flexible instances
Reserved
EC2 Instances Purchasing Options - (1 & 3 years) –commitment to an amount of usage, long workload
Savings Plans
EC2 Instances Purchasing Options - short workloads, cheap, can lose instances (less reliable)
Spot Instances
EC2 Instances Purchasing Options - book an entire physical server, control instance placement
Dedicated Hosts
EC2 Instances Purchasing Options - no other customers will share your hardware
Dedicated Instances
EC2 Instances Purchasing Options
- Pay for what you use:
- Linux or Windows - billing per second, after the first minute
- All other operating systems - billing per hour
- Has the highest cost but no upfront payment
- No long-term commitment
- Recommended for short-term and un-interrupted workloads, where you can’t predict how the application will behave
EC2 On Demand
- 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 (+), Partial 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 Marketplace
- Convertible Reserved Instance
- Can change the EC2 instance type, instance family, OS, scope and
tenancy - Up to 66% discount
- Can change the EC2 instance type, instance family, OS, scope and
EC2 Reserved Instances
- Get a discount based on long-term usage (up to 72% - same as RIs)
- Commit to a certain type of usage ($10/hour for 1 or 3 years)
- Usage beyond this pricing option is billed at the On-Demand price
- Locked to a specific instance family & AWS region (e.g., M5 in us-east-1)
- Flexible across:
- Instance Size (e.g., m5.xlarge, m5.2xlarge)
- OS (e.g., Linux, Windows)
- Tenancy (Host, Dedicated, Default)
EC2 Savings Plans
- 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 the current spot price
- The MOST cost-efficient instances in AWS
- Useful for workloads that are resilient to failure
- Batch jobs
- Data analysis
- Image processing
- Any distributed workloads
- Workloads with a flexible start and end time
- Not suitable for critical jobs or databases
EC2 Spot Instances
- 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
EC2 Dedicated Hosts
- Instances run on hardware that’s dedicated to you
- May share hardware with other instances in same account
- No control over instance placement (can move hardware after Stop / Start
EC2 Dedicated Instances
- Reserve On-Demand instances capacity in a specific AZ for any duration
- You always have access to EC2 capacity when you need it
- No time commitment (create/cancel anytime), no billing discounts
- Combine with Regional Reserved Instances and Savings Plans to benefit from billing discounts
- You’re charged at On-Demand rate whether you run instances or not
- Suitable for short-term, uninterrupted workloads that needs to be in a
specific AZ
EC2 Capacity Reservations
GO TO VIDEO 43 MIN 5:45
Control over the EC2 Instance placement strategy
Placement Groups
What are the 3 types of Placement Groups
Cluster
Spread
Partition
a Placement group that is a Low-latency group in a single Availability Zone
Cluster Placement Groups
Instances across underlying hardware (max 7 instances per group per AZ)
Spread Placement Group
Instances across many different partitions (which rely on different sets of racks) within an AZ. Scales to 100s of EC2 instances per group (Hadoop, Cassandra, Kafka)
Partition
Placement Group
- Pros: Great network (10 Gbps bandwidth between instances with Enhanced Networking enabled - recommended)
- Cons: If the rack fails, all instances fails at the same time
- Use case:
- Big Data job that needs to complete fast
- Application that needs extremely low latency and high network throughput
Cluster Placement Group
Placement Group
- Pros:
- Can span across Availability Zones (AZ)
- Reduced risk is simultaneous failure
- EC2 Instances are on different physical hardware
- Cons:
- Limited to 7 instances per AZ per placement group
- Use case:
- Application that needs to maximize high availability
- Critical Applications where each instance must be isolated from failure from each other
Spread PLACEMENT GROUP
- Up to 7 partitions per AZ
- Can span across multiple AZs in the
- Up to 100s of EC2 instances
- The instances in a partition do not share racks with the instances in the other partitions
- A partition failure can affect many EC2 but won’t affect other partitions
- EC2 instances get access to the partition information as metadata
- Use cases: HDFS, HBase, Cassandra, Kafka
Partition Placements Groups