EC2: elastic compute cloud Flashcards

1
Q

EC2 Basics

A
  • Infra as a service
  • rent virtual machines (EC2)
  • store data on virtual drives (EBS)
  • distribute loads across machines (ELB)
  • scale services using auto scaling group (ASG)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

EC2 Sizing and Configuration Options

A
  • OS: Linux, MacOS, Windows
  • CPU: how many compute cores + powers
  • RAM
  • storage space
  • network card: speed of the card, public IP address
  • firewall rules
  • bootstrap script: launching commands when a machine first starts, only runs once at instance first start (i.e, EC2 user data script)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

EC2 User Data Script

A

used to automate bootstrap tasks such as installing updates, software, download common files

runs with root user (pseudo rights)

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

EC2 Instance Types

A
  • 7 basic types, each with different families (i.e, General Purpose)
  • naming convention: m5.2xlarge
  • m: instance class
  • 5: generation (increases over time)
  • 2xlarge: size within instance class
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

EC2 Instance: General Purpose

A

balance between computer, memory, networking. great for diversity of workloads, web servers, code repos, etc.

ex: t2.micro

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

EC2 Instance: Compute Optimized

A

compute intensive tasks (ex: C5)

use cases: batch processing workloads, media transcoding, high performance web server or computer (HPC), scientific modeling + machine learning, dedicated game servers

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

EC2 Instance: Memory Optimized

A

fast performance for processing large data sets, relation/non-relational databases

use cases: distributed web scale cache stores, in-memory databases optimized for Business Intelligence, applications performing real time processing of big unstructured data

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

EC2 Instance: Storage Optimized

A

for storage intensive tasks, high read/write access to large data sets on local storage

high frequency online transactional processing (OLTP) systems

relational and noSQL databases

cache or in-memory databases (ex: Redis)

data warehousing applications

distributed file systems

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

EC2 Security Groups

A

fundamentals AWS network security that:

  • control how traffic is allowed in/out of EC2 instances
  • only contain ALLOW rules
  • rules can reference by IP / by security group
  • act as firewall
  • regulate access to ports, authorized IP ranges IPv4 - IPv6, control of outbound network (from instances to other) and inbound (from other to instances)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Security Groups

A

can be attached to multiple instances

locked down t a region /VPC combination

live outside the EC2, so if traffic is blocked, EC2 can’t see it

timeout errors = security group issue

all inbound traffic blocked by default + all outbound traffic authorized by default

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

Classic Ports

A

22 = SSH (secure shell) log into linux instance

21 = FTP (file transfer protocol) upload files

22 = SFTP (secure file transfer protocol) upload files with SSH

80 = HTTP access unsecured websits

443 = HTTPS access secured websites

3389 = RDP (remote desktop protocol) log into Windows instance

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

EC2 Purchasing Options: On-Demand Instances

A

short workload, predictable pricing, pay by second

highest cost but no upfront payment, no long term commitment

recommended for unpredictable apps

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

EC2 Purchasing Options: Reserved

A

1 & 3 years - long workloads

*convertible reserved instances: long workloads with flexible instances

no upfront, partial upfront, all upfront with increasing discounts

regional / zonal

recc for steady state apps like databases

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

EC2 Purchasing Options: Savings Plans

A

1 & 3 years - commitment to an amount of usage, long workload, usage beyond is billed at On-Demand price

locked to specific instance family and AWS region

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

EC2 Purchasing Options: Spot Instances

A

short workloads, cheap, can lose instances (less reliable)

can lose instance at any point in time if your max price is less than current spot price

but most cost efficient

recc for workloads resilient to failure like batch jobs, distributed workloads, *not suitable for critical jobs

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

EC2 Purchasing Options: Dedicated Hosts

A

book an entire physical server, control instance placement - most expensive option.

allows you address compliance requirements & use your existing server bound software licenses

can pay on demand for each active dedicated host or reserved 1 / 3 years

use cases: for software w/ complicated licensing model (BYOL) or companies with strong regulations and compliance needs

17
Q

EC2 Purchasing Options: Dedicated Instances

A

run on hardware dedicated to you, may share hardware with other instances on same account. no control over instance placement.

18
Q

EC2 Purchasing Options: Capacity Reservations

A

reserve on-demand instances capacity in a specific AZ for any duration. always have access to EC2 capacity when you need it. no time commit or billing discounts (create / cancel any time).

use cases: short term uninterrupted workloads that needs to be in specific AZ

19
Q

Responsibility Model

A

AWS: infrastructure (global network security), isolation on physical hosts, replace faulty hardware, compliance validation

Customer: security group rules, OS patches + updates, software and utilities installed on EC2, IAM roles assigned to EC2 and user access management, data security on instance