Section 5: EC2 Fundamentals Flashcards
How to create a Budget?
AWS Console->Billing->Budget
What does EC2 stand for and what is it?
- EC2 = Elastic Compute Cloud
- Its a virtual machine
What is EC2 User Data?
- Bootstrap script which runs when a machine launches.
- The script can only run once at the instance first start.
- Its a a automate boot task for:
- Installing updates
- Installing software
- Downloading common files from the internet
- Anything you can think of - The EC2 User Data Script runs with the root user.
What are the naming convention for EC2 Instances type?
Example m5.2xlarge
m: instance class
5: generation
2xlarge: size within the instance class
Name different EC2 Instance Types
1) General Purpose
- Used for web servers and code repositories
- Balance between compute, memory and networking.
2) Compute Optimize(
- Task that required high performance processors such as:
*Batch processing
* High performance we servers
- Instance name start with “C” Example C6g,C5
3) Memory Optimized
- Systems which required large sets of memory
Use Case:
- High performance relational/non-relational databases
- Distributed web scale cache stores
- Instance name start with "R" Example R5,R4
4) Storage Optimized
- Systems which requires storage-intensive task.
Use Cases:
- Relational & noSQL Database
- In-memory databases(Redis)
- Instance start with "I" Example I3
Important ports to know
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
80 = HTTP - Access unsecured websites
443 = HTTPS - access secured websites
3389 = RDP(remote Desktop Protocol) - log into a Windows instance
How to SSH into a Windows 10 machine?
ssh -i C:\Users\Peterv\Downloads\EC2Tutorial.pem ec2-user@13.246.51.11
Give different EC2 instance purchasing options
1) On-Demand Instance:
- short workload, predictable pricing
- Pay what you use,billing per seconds after the first minute
- Highest cost but no upfront payment
- No long term commitment
- Recommended for short-term and un-interrupted workloads
2) Reserved:(Minimum 1 year)
- Up to 75% discount compared to On-demand
- Reservation period: to 3 years
- Purchasing options: no upfront,partial upfront,All upfront
-Reserve a specific intsance type.
-Recommended for steady-state usage applications.
3) Spot Instance: short workloads, cheap ,can lose instances(less reliable)
- Can get discount of up to 90% compared to On-demand.
- Instance that you can “lose” at any point of time if your max price is less than the current spot price.
-Most cost-efficient instances in AWS
-Useful batch processing,image processing
-Not Suitable for critical jobs or database.
4) Dedicated Host: book a entire physical server,control intance placement
-Its is a physical server dedicated to you.
- If it is a compliance requirement and you can save cost because you can use your own existing server-bound software licenses.
-Allocated to your account for 3 years period.
-More expensive.
-Useful for software that have complicated license model
-For companies that have strong regulatory or compliance needs
What is Spot Fleets?
Spot fleets allow us to automatically request Spot Instances with the lowest price for On-Demand instances