EC2 Fundamentals (Associate) Flashcards
What are some different capabilities of EC2 (Elastic Compute Cloud)
- Renting virtual machines (EC2)
- Storing data on virtual drives (EBS)
- Distributing load across machines (ELB)
- Scaling the services using an auto-scaling group (ASG)
What are the different operating systems (OS) you can use for EC2 instances?
- Linux
- Windows
- Max OS
When configuring your EC2 what are things you have to consider?
- Consider the what type of OS to use
- How much compute lower & core (CPU)
- How much random access memory (RAM)
- How much storage space (network-attached such as EBS & EFS, also consider hardware such as EC2 instance store)
- Network card: speed of the card, public IP address
- Firewall rules
- Bootstrap script (EC2 user data)
It is possible to bootstrap your instances using _____________ scripts
EC2 user data scripts
What does bootstrapping mean?
Launching commands when a machine starts
- So the script is only ran once at the instance first start and never ran again
EC2 user data is used to automate boot task such as what?
- Installing updates
- Installing software
- Downloading common files from the internet
- Anything you can think of
What is AWS naming conventions for its EC2 instances?
m5.2xlarge
m- is the instance class
5-is the generation (AWS improves them over time so when it upgrades it will be 6 n so on)
2xlarge- is the size within the instance class
General purpose instances are great for what?
A diversity of workloads such as web servers or code repositories n they provide a good balance between compute, memory, networking (ex. t2.Mirco is a general purpose instance)
Compute optimized instances are great for what?
-Batch processing workloads
-Media transcoding
-High Performance web servers
-High Performance Computing
-Scientific modeling & machine learning
-Dedicated gaming servers
They have a C and are great for compute - intensive task that require high performance processors
What are memory optimized instances good for?
-High Performance relational/non-relational databases
- Distributed web scale cache stores
-In memory databases optimized for BI (business intelligence)
-Application performing real time processing of big unsaturated data
Are also great for fast performance for workloads that process large data sets in memory
What are storage optimized instances good for?
They are great for storage intensive task that require high, sequential read and write access to large data sets on local storage
Can use them for:
- High frequency online transaction processing (OLTP) systems
-Relational & NoSQL databases
-Cache for in-memory databases
-Data warehousing applications
-Distributed file system
___________ are the fundamental of network security in AWS where they control how traffic is allowed into or out of our EC2 instances and they only contain _______ rules and their rules can reference by IP or by __________
Security groups, allow rules, security group
________ act as a firewall for your EC2 instances
Security groups
What do security groups regulate?
They regulate:
- Access to Ports
- Authorized IP ranges (IPv4 & IPv6)
- Control of inbound network (from other to the instance)
- Control of outbound network (from the instance to other)
Security groups can be attached to ________ instances
Multiple
Security groups are locked down to a ____________
Region/VPC combination
It’s good to maintain one separate security group for ________ access
SSH access
If your application is not accessible (time out) then it’s a _______ issue and if it’s a connection refused error then it’s a ___________ issues or it’s not launched
Security groups issue, application error
With security groups by default all inbound traffic is ______ and all outbound traffic is _________
Blocked, authorized
What are the different ports?
- 22= SSH (secure shell)- log into a Linux instance
- 21 = FTP (file transfer protocol) - upload files into a file share
-22= SFTP (secure file transfer protocol) - upload files using SSH
Why are on demand instances good for?
Short workload, predictable pricing, pay by second
What are the two different type of Reserved Instances (1 & 3 yr plan)
- Reserved instances- good for long workloads
- Convertible reserved instances- good for long workloads with flexible instances
Savings Plans (1&3 yr commitment) EC2 Instances pricing option
God for committing to an amount of usage & long workloads
Spot Instances
Good for short workload, cheap, and can loose instances (less reliable)
Dedicated host
Book an entire physical server, control instance placement
Dedicated instances
You decided when to start, launch, and kill the instance, no other customer will share your hardware
Capacity reservations
Reserve capacity in a specific AZ for any duration
With __________ you can reserve on demand instances capacity in a specific AZ for any duration and you have no time commitment and no billing discounts
capacity reservations
With spot instances you have to define the _________ and get the instance while current spot price is less than _______ then you can keep the instance
Max spot price
With spot instances what happens when the current spot price is greater than the max price?
You have 2 mins grace period to decided to stop or terminate your instance
If you don’t want your spot instance you be claimed by AWS what other option can you do?
Use a spot block, which is a spot instance during a specified time frame ( 1 to 6 hours) without interruption
What are the best use cases for spot instances?
For batch jobs, data analysis, or workloads that are resilient to failures and not great for critical jobs or databases
When trying to terminate a spot instance what’s the first thing you must do?
Create a spot request
What do you have to define when creating a spot request?
- Maximum Price
- Desired number of instances
- Launch specifications
- Request type ( one time | persistent)
- Valid from, Valid until
With ________ spot request, as soon as your spot instances are fulfilled, your instances are going to be launched and then your spot instance will go away
One time
With ________ spot request, then you want your number of instances to be valid as long as from the valid from to the valid until
Persistent
If your spot request is persistent but for some reason you lost your spot instance (like it going over the max price) what will happen?
It will start an instance up and go into the spot request and when everything is validated it will restart everything for you
If you want to cancel a spot instance, what state must it be in?
It must be in an open or active or disable state
So when you want to cancel a spot request what is your responsibility?
You must terminate any instances you have launched from before
When you want to terminate Spot instance for good what must you do?
Must cancel the spot request and then terminate your instances
What is a spot fleet?
It’s a way for you to get a set of spot instances and it will try to meet the target capacity with price constraints
What strategies is used to allocate spot instances in your spot fleet?
- Lowest price- the spot fleet will launched instances from the pool that has the lowest price ( good for cost optimization)
- Diversified- distribute instances across all pools (great for availability and long workloads)
- Capacity optimized - pool with the optimal capacity for the number of instances
- Price capacity optimized (recommended) - pool with highest capacity available, then select the pool with the lowest price (best choice for most workloads)
Spot fleet will allow you to automatically request __________ with the lowest price
Spot instances