EC2 Flashcards
What does EC2 stand for?
Elastic compute Cloud
What is the EC2 User Data Script used for?
To automate boot tasks such as installing updates/software, downloading files etc.
What are the use cases for General Purpose EC2 Instance Types?
Web servers, Code repositories etc.
What are 6 example use cases for Compute Optimized EC2 Instances?
- Batch Processing Workloads
- Media Transcoding
- High Performance Web Servers
- High Performance Computing (HPC)
- Scientific Modeling and Machine Learning
- Dedicated Gaming Servers
What are 4 example use cases for Memory Optimized EC2 Instances?
- High Performance databases
- Distributed web scale cache stores
- In-memory databases optimized for BI
- Apps performing real-time processing of big unstructured data
What are 5 use case examples for Storage Optimized EC2 Instances?
- High frequency online transaction processing systems (OLTP)
- Relational and non relational databases
- Cache for in-memory databases (Redis)
- Data Warehousing applications
- Distributed File System
What is a Security Group?
It is like a Firewall
What 4 things do Security Groups Regulate?
- Access to Ports
- Authorized IP ranges
- Control of inbound network
- Control of outbound network
Can a Security Group be attached to multiple EC2 instances?
Yes, and an instance can have multiple security groups
Are Security Groups Global?
No, they are tied to a specific region/VPC combination.
If my application is showing a timeout when I try to connect, what is the likely cause?
A security group misconfiguration
If my application gives a connection refused error, what is the likely cause?
An app error or app failed to launch. The security group config is fine
What are the default inbound/outbound security group settings?
- Inbound traffic is blocked
- Outbound traffic is authorized
What is the SSH port?
22
What is the FTP pport?
21
What is the SFTP port?
22
What is the HTTP port?
80
What is the HTTPS port?
443
Whats is the RDP port?
3389
What are the 4 EC2 Instance purchasing options?
- On-Demand instances
- Reserved Instances
- Spot Instances
- Dedicated Hosts
What are 4 features of On-Demand Instances?
- Pay for what you use
- Highest cost but no upfront payment
- No long term commitment
- Recommended for short term and un-interrupted workloads
What are the 5 features of Reserved Instances?
- Up to 75% discount compared to on-demand
- Reservation periods of 1 or 3 years
- Pay zero upfront, partial or full
- Reserve a specific instnace type
- Recommended for steady state apps like databases
What are the 2 types of Reserved Instances?
- Convertible
- Scheduled
What are 5 features of Spot Instances?
- Up to 90% discount compared to on-demand
- Can lose instances anytime if your bid price gets lower than the spot price
- Most cost-efficient instances
- Useful for workloads that are resilient to failure
- Not suitable for critical jobs or databases
What are 5 examples of apps that are resilient to failure?
- Batch jobs
- Data Analysis
- Image Processing
- Distributed workloads
- Workloads with flexible start/end time
What are the 5 features of Dedicated Hosts?
- Helps address compliance requirements and reduce costs by using existing software licenses
- Allocated to your account for 3 years
- More expensive
- Useful for software that has a complicated licensing model (BYOL)
- Suitable for string compliance or regulatory needs
What is the difference between Dedicated Host and Dedicated Instance?
A Dedicated instance does not provide access to the underlying hardware for the dedicated resources
What is a Spot Block?
It allows you to block a spot instance for a specified time frame 1-6 hours
How many Elastic IPs can you have in your account?
5
What should you do instead of using ElasticIPs?
- Use random public IPs and register a DNS name to it
- Use Load Balancer instead of public IP
What are the 3 strategies available for Placement Groups?
- Cluster
- Spread
- Partition
What does the Cluster Strategy for placement groups do?
Clusters instances into a low latency group in a single partition in a single AZ
What does the Spread Strategy for placement groups do?
Spreads instances across underlying hardware, with a max of 7 instances per group per AZ
What does the Partition Strategy for placement groups do?
Spreads instances across many different partitions within an AZ
What does ENI stand for?
Elastic Network Interfaces
What is an ENI?
A logical component in a VPC that represents a virtual network card
What are the 5 most important attributes an ENI can have?
- Primary private IPv4
- One Elastic IP
- One Public IPv4
- One or more Security Groups
- A MAC address
Is an ENI tied to a specific EC2 instance?
No, they can be created independently and moved from one instance to another
Is an ENI global?
No, they are AZ specific
What is EC2 Hibernate?
It is a new feature that preserves the in-memory state in the event an instance is stopped.
What are 3 use cases for Hibernate?
- Long running processes
- Saving RAM state
- Services that take time to initialize
What is EC2 Nitro?
The underlying platform for the next generation of EC2 instances
What are the 2 advantages of Nitro?
- Better Networking Options
- Higher Speed EBS, for up to 64,000 IOPS
Can I change the default number of cores and threads?
Yes, you can optimize vCPU to specify that you want 2 cores instead of 4, 1 thread per core instead of 2 at instance launch time