EC2 Fundamentals Flashcards

(21 cards)

1
Q

What is EC2?

A

It is an AWS Service = Elastic Compute Cloud = IaaS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

EC2 structure

A

It consists in the capability of:
Renting VM (EC2)
Storing data on Virtual drives (EBS)
Distributing load accros machines (ELB)
Scaling the services using auto-scaling group (ASG)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

EC2 sizing and configuration options

A

OS: Linux, Win or MacOS
CPU: compute power and cores
RAM: random-access memory
Storage space:
EBS or/and EFS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

EC2 sizing and configuration options

A

OS: Linux, Win or MacOS
CPU: compute power and cores
RAM: random-access memory
Storage space:
- Network attached: EBS or/and EFS
- Hardware: EC2 Instance Store
Network card: speed, public IP
Firewall rule: security rules
Bootstrap script

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

EC2 User Data what is?

A

It is possible to bootstrap instances using an EC2 User Data script

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Bootstrapping what is?

A

Bootstrapping means launching commands when a machine starts. This script is only run once when the instance first start

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

EC2 User Data usage

A

It can be used for:
Installing updates
Installing software
Downloading common files from the Internet
Anything that you will need at first start

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

EC2 Instance Types

A

There are following instance types available in AWS:
General Purpose
Compute Optimised
Memory Optimised
Accelerated Computing
Storage Optimised
Instance Features
Measuring Instance Performance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

AWS EC2 instance naming convention

A

m5.2xlarge

m: instance class
5: generation
2xlarge: represent size of the instance class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

EC2 Instance Type - General Purpose

A

Great for a diversity of workloads such as web server or code repository
Has balance between:
- Compute
- Memory
- Networking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

EC2 Instance Types - Compute Optimised

A

Great for compute-intensive tasks that require high performance processors:
- Batch processing workloads
- Media transcoding
- High performance computing (HPC)
- Gaming servers
- High performance web server
- Machine Learning

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

EC2 Instance Types - Memory Optimised

A

Fast performance for workloads that process large data sets in memory:
- High performance, relation/non-relation databases
- Distributed web scale cache stores
- In-memory db optimised for BI
- Applications performing real-time processing of big unstructured data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

EC2 Instance Types - Storage Optimised

A

Great for storage-intensive tasks that required high, sequential R/W access to large data sets on local storage:
- Relational and NoSQL DB
- Cache for in-memory DB (Redis)
- Data Warehousing app
- Distributed file systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Security Groups what is?

A

It is fundamental of network security in AWS
It control how traffic is allowed into or out of our EC2 instances

Security groups only contain ALLOW rules

Security group rules can reference by IP or by another security group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Security groups deep dive

A

SG acting as a firewall on EC2 instances
They regulate:
- Access to Port
- Authorised IP ranges IPv4 and IPv6
- Control of inbound network (from other to the instance)
- Control of outbound network (from the instance to other)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

SG Good to know

A

Can be attached to multiple instances
Locked down to region/VPC (it means if you change the region for you instances, or move to new VPC, then you need to create a new SG for EC2
SG live outside the EC2, if traffic is blocked, EC2 instance will not see it

  • Separate SG for SSH access
17
Q

EC2 default traffic rule

A

All inbound traffic to EC2 instance is BLOCKED by default
All outbound traffic to EC2 instance is AUTHORISED by default

18
Q

EC2 Instances Purchasing Options

A

On-Demand Instances - short workload, predictable pricing
Reserved (1 or 3 y)
- Reserved Instances - long workloads
- Convertible Reserved Instances - long workload with flexible instances
Savings Plans (1 or 3 y) - commitment to an amount of usage, long workload
Spot Instances - short workloads, cheap, can lose instances
Dedicated Hosts - book an entire physical server
Dedicated Instances - no other customers will share your hardware
Capacity Reservations - reserve capacity in a specific AZ for any duration

19
Q

EC2 Spot Instances

A

Can get a discount of up to 90% compared to On-demand price
Define MAX SPOT PRICE and get the instance while CURRENT SPOT PRICE < MAX

20
Q

Elastic IPs

A
  • When you stop and then start an EC2 instance, it can change its public IP
  • If you need to have a fixed public IP for your instance, you need an Elastic IP
  • An Elastic IP is a public IPv4 IP you own as long as you don’t delete it
  • You can attach it to one instance at a time
  • You can only have 5 Elastic IP in your account (you can ask AWS to increase that)
21
Q

Tips about Elastic IP

A

Try to avoid using Elastic IP
- They often reflect poor architectural decisions
- Instead, use a random public IP and register a DNS name to it
- Using a Load Balancer better architecture solution, and don’t use a Public IP