5. EC2 Flashcards
List the EC2 Instance Launch Types.
- On-Demand
- Reserved (reserved, convertible reserved)
- Spot Instances
- Dedicated Instances
- Dedicated Hosts
new: - Savings Plans
- Capacity Reservations
What are On-Demand instances?
- Best for short-term and uninterrupted workloads
- Highest cost launch type
What are Reserved instances?
- 1 or 3 years only
- recommended for steady-state usage applications with long workloads (think database)
- you reserve specific instance attributes (instance type, region, tenancy, OS)
- best for steady state applications (databases)
What are Convertible Reserved instances?
- 1 or 3 years only
- recommended for long workloads
- can change the EC2 instance type
- best for long workloads with flexible instances
What are Spot instances?
- best for workloads that are resilient to failure (batch jobs, data analysis, image processing, etc)
- not great for critical jobs or databases
- CHEAP
- can lose instances (less reliable)
What are Dedicated instances?
- 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)
- no instance placement control
What are Dedicated Hosts?
- book an entire physical server
- control instance placement
- most expensive option
- useful for software with complicated licensing models and/or companies with strong regulatory or compliance needs
What is EBS?
Elastic Block Storage
- a network drive you can attach to your instances while they run, allowing your instances to persist data
- Can be attached to only one instance at a time
- Are locked at the Availability Zone (AZ) level
- To migrate an EBS volume across AZ: Take a snapshot and restore the snapshot to another AZ
- Root EFS volumes of instances get terminated by default if the EC2 instance gets terminated (you can disable that)
What is EFS?
Elastic File Storage
- Mounting 100s of instances across AZ
- EFS share website files (WordPress)
- Only for linux instances (NOT Windows)
- EFS has a higher price point than EBS
- Highly available, scalable, expensive (3x gp2), pay per use
What is an EC2 Instance Store?
- Physical disk attached to the physical server where your EC2 is
- Very high IOPS (because physical)
- Block storage (just like EBS)
- Cannot be increased in size
- Risk of data loss if hardware fails
What is EC2 User Data?
EC2 User Data is used to automate boot tasks such as:
- installing updates
- installing software
- downloading common files from the internet
The EC2 User Data Script runs with the root user
- script only runs once at instance first start
What is an AMI?
Amazon Machine Image
- image used to create instances
- AWS comes with base images (Ubuntu, Windows, etc)
- images can be customized at runtime using EC2 User Data
- AMIs are built for a specific AWS region
What is an ENI?
Elastic Network Interface
- logical component in a VPC that represents a virtual network card
- bound to a specific AZ
- you can create ENI independently and attach them on the fly (move them)
Security groups contain what kind of rules?
Security groups only contain ALLOW rules
If your application throws a timeout error, what is the issue?
Security Group Issue
If you application gives a “connection refused” error, what is the issue?
Application error - check that it’s launched
What port is used for RDP (Remote Desktop Protocol)?
3389
What port is used for HTTP?
80
What port is used for HTTPS?
443
What port is used for SSH?
22
What port is used for FTP?
21
What port is used for SFTP?
22 (files are uploaded via SSH)