EC2 Fundamentals Flashcards
What is an EC2?
EC2 = Elastic Compute Cloud = Infra as a service
What are EC2 capabilities?
- Virtual Machines (EC2)
- Storing data on virtual drives (EBS)
- Distributing load across machines (ELB)
- Scaling the services using an auto-scaling group (ASG)
What OS Can you use on an EC2?
- Linux
- Windows
- Mac OS
What are the 7 settings you can choose on an EC2?
- OS
- CPU
- RAM
- Storage space
- Network Card (speed, public IP address)
- Firewall Rules (security group)
- Bootstrap script (configure at first launch) for EC2 user data
What are the 2 options of storage you can have in EC2?
- Network-attached (EBS & EFS)
- Hardware (EC2 Instance Store)
What is Bootstrapping?
launching commands when a machine starts (runs once at beginning)
What is the EC2 user data (bootstrap) used for?
To Automate boot tasks such as:
- Installing updates
- Installing software
- Downloading common files from internet
- Anything really
What user does the EC2 User Data script runs with?
Root (has sudo rights)
What are the EC2 instance types?
t2.micro
t2xlarge
These dictate vCPU, Mem (GiB), Storage, Network, EBS bandwidth
Which instance type of EC2 is included in the free tier?
t2.micro (up to 750 hours per month)
What happens when you stop and start an EC2 instance?
The public IP might change (the private wont)
How many instance types of EC2 are there?
7
What are the instance types of EC2?
- General Purpose
- Compute optimised
- Memory optimised
- Accelerated computing
- Storage optimised
- Instance features
- Measuring Instance performance
What does “m5.2xlarge” mean?
m = instance type
5 = generation
2xlarge = size within the instance class
What is a General Purpose EC2 instance type good for?
Great for diversity of workloads such as web servers or code repositories
Balance between:
1. compute
2. memory
3. networking
What are Compute Optimised EC2 instances good for?
Compute-intensive tasks that need high perf processors.
- batch processing workload
- media transcoding
- high perf web servers
- high perf computing (HPC)
- scientific modelling & ML
- dedicated gaming servers
What are Memory Optimised EC2 instances good for?
Fast performance for workloads that process large data sets in memory
- High perf relational/non relational database
- distributed web scale cache stores
- in-memory databases optimised for BI (Business intelligence)
- apps performing real-time processing of big unstructured data
What are Storage Optimised EC2 instances good for?
Good for storage-intensive tasks that need high sequential read/write access to large data sets on local storage
- High frequency online transaction processing (OLTP)
- Relational & NoSQL databases
- Cache for in-memory databases (Redis)
- Data warehousing apps
- Distributed file systems
What do Security Groups do?
Control how traffic is allowed in/out of EC2 instances
What kind of rules do Security Groups contain?
Allow rules only
What do Security Groups rules reference by? (what do they see and say yes or no)
Based on IP or Security Groups
How is a Security Group used? Give a scenario
You put the SG around an EC2, and they block everything. You then set the allow list for inbound/outbound traffic.
Are Security Groups like a firewall?
Yes
What do Security Groups regulate?
- Access to ports
- Authorised IP ranges - IPv4 / IPv6
- Inbound traffic
- Outbound traffic