EC2 Fundamentals Flashcards
What does EC2 stand for?
Elastic Compute Cloud
What operating systems can you choose for EC2 instances?
- Linux (most popular)
- Windows
- Mac OS
What does bootstrapping mean?
Launching commands when the machines starts
What is EC2 user data’s main purpose?
To automate boot task
- installing software/updates
- downloading files from internet.. etc
Used for a diversity of workloads such as web servers or code repositories
What is this EC2 instance type?
General Purpose
What is a repository?
A central location where data is stored and managed
Great for task that require HIGH PERFORMANCE processors
What EC2 instance type?
Compute Optimized
FAST PERFORMANCE for workloads that process large data sets in memory
What EC2 instance type is this used for?
Memory Optimized
Great for task that require high sequential read and write access to large data sets on local storage
What EC2 instance type is this used for?
Storage Optimized
What instance type has these use cases?
- Batch processing workloads
- Media transcoding
- High performance web servers
- High performance computing (HPC)
- Scientific modeling & machine learning
- Dedicated gaming servers
Compute Optimized
What instance type has these 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
Memory Optimized
What instance type has these use cases?
- High frequency online transaction processing (OLTP) systems
- Relational & NoSQL databases
- Cache for in-memory database
- Data warehousing applications
- Distributed file systems
Storage Optimized
What do Security Groups do?
Control how traffic is allowed in or out of EC2 Instances
Security groups only contain what type of rules?
Allow
Security Groups act as a _________ on EC2 instances
“Firewall”
Are Security Groups locked down to a region/VPC combination?
Yes.
Can Security Groups be attached to multiple instances?
Yes
If your application is not accessible (time out), then it’s a what?
Security Group issue
If your application gives a “connection refused” error, then it’s a what?
Application error or it’s not launched.
Enables you to launch AWS resources into a virtual network that you’ve defined
Virtual Private Cloud
What is EC2’s purpose?
To provide scalable computing capacity in the AWS Cloud.
For Security Groups, all inbound traffic is _______.
All outbound traffic is __________.
Blocked
Authorized
Port 22 (2) It’s purpose?
•SSH (Secure Shell)
Log into a Linux instance
•SFTP (Secure File Transfer Protocol)
Upload files using SSH
Port 21
It’s purpose?
FTP (File Transfer Protocol)
Upload files into a file share
Port 80
It’s purpose?
HTTP (HyperText Transfer Protocol)
Access unsecured websites
Port 443
It’s purpose?
HTTPS
Access secured websites
Port 3389
It’s purpose?
RDP (Remote Desktop Protocol)
Log into a Windows instance
Security groups rules can reference by (blank) or by (blank)
IP;Security group
What do security groups regulate?
- Access to Ports
- Authorized IP ranges
- Control of inbound/outbound network
SSH is one of the most important functions in the Amazon Cloud. It allows you to what?
Control a remote machine by using the command line.
When you first download a file the permission is something called 0644, meaning the files are too open. This will not allow you to SSH into that machine. How would you fix this?
UNPROTECTED PRIVATE KEY FILE
chmod 0400 then reference the key name.
What are the four types of EC2 purchasing options?
- On-Demand Instances
- Reserved
- Spot Instances
- Dedicated Host
- Pay for what you use
- Has the highest cost but no upfront payment
- No long term commitment
- Recommended for short term and uninterrupted workloads, where you can’t predict how the application will behave.
What EC2 instance purchasing option is this?
On-Demand
- Up to 75% discount compared to On-Demand
- Either 1 or 3 years
- No upfront, partial upfront or all upfront payments
- Recommended for steady-state usage applications (think data base)
What EC2 instance purchasing option is this?
Reserved Instances
- Can change the EC2 instance type (i.e t2.large, c5.large, r5 or 4x.large etc)
- Up to 54% discount
What EC2 instance purchasing option is this?
Convertible Reserved Instance
- Launch within time window you reserve
- When you require it just for a day/week/month
- Still commitment over 1-3 years
- This service is deprecated
Scheduled Reserved Instances
- Provides up to 90% discount compared to On-Demand
- You can lose at any time if your max price is less than the current ____ price
- The MOST cost efficient instance in AWS
What EC2 instance purchasing option is this?
Spot Instances
What is spot instances terrible to use for?
Critical jobs or databases
What is EC2 Spot Instances useful for?
- Batch jobs
- Image processing
- Data analysis
- Workloads that are resilient to failures
- Workloads with a flexible start and end time
- A physical server with EC2 instance capacity fully dedicated to your use
- Can help you address compliance requirements and reduce cost by allowing you to use your existing server-bound software licenses
- Allocated for your account for a 3 year period reservation
- More expensive
- Useful for software that have complicated licensing model
- Also, companies that have strong regulatory or compliance needs
What EC2 instance purchasing option is this?
EC2 Dedicated Hosts
- Instances running on hardware that’s dedicated to you
- May share hardware w other instances in same account
- No control over instance placement (can move hardware after Stop/Start)
What EC2 instance purchasing option is this?
EC2 Dedicated Instances
They provide a balance between cost and reliability for users who have the need to keep the cluster running for a definite period of time while keeping the costs at the minimum.
Spot Block
You can only cancel a Spot Instance request in what 3 states?
Open, active or disabled
Does cancelling a Spot Request terminate instances?
No.
How do you terminate Spot Instances for good?
First, cancel the Spot Request then terminate the associated Spot Instances
Spot fleet is the ultimate way to do what?
Save money
What are Spot Fleets?
Set of Spot Instances + On-Demand Instances (optional)
When does a Spot Fleet stop launching?
When reaching capacity or max cost
What are some strategies to allocate Spot Instances?
- lowest price
- diversified (great for availability, long workloads)
- capacityOptimized: Pool with the optimal capacity for the # of instances
Using the Spot Fleet you’re able to define what?
Multiple launch pools and instance types
Spot Fleets allow us to automatically do what?
Request Spot Instances with the lowest price
This EC2 Purchasing Option is good for short workloads and is the cheapest option but it is less reliable because you can lose your EC2 instance.
Which Purchasing Option is it?
Spot Instance
What should you use to control traffic in and out of EC2 instances?
Security Groups
How long can you reserve an EC2 Reserved Instance?
1 or 3 years only
EC2 User Data is used to (blank) your EC2 instance using a what?
Bootstrap; bash script
A simple text file that contains commands which are used in the command line
Bash Script
Security Groups can be attached to only one EC2 instance. T or F
False.