EC2 Flashcards

1
Q

What is a role?

A

An entity designed to be assumed. It provides temporary access using temp credentials

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

What do roles enable in an account?

A

They enable cross account access

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

Are roles regional?

A

No they are global

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

Why would you want to use roles in EC2?

A

Avoids hard coding credentials

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

Can you attach/detach roles on a running EC2 instance?

A

Yes you can

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

What are Security Groups?

A

Virtual Firewalls

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

By default what settings does a Security Group have?

A

Everything inbound by default is blocked. All outbound traffic is allowed

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

What are bootstrap scripts?

A

Scripts that run on instance first startup

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

What permissions do bootstrap scripts have?

A

Has root access

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

Why use bootstrap scripts?

A

Enables automation of installing applications in EC2

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

How many instances can be in a Security Group?

A

Unlimited

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

How many Security Groups can an instance attach?

A

5

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

What is EC2 metadata?

A

Data about ec2 instance such as ip addresses, hostname, SG’s

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

What is the url for EC2 metadata?

A

169.254.169.254/latest/meta-data

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

What is EC2 user-data?

A

The bootstrap scripts

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

Can you access metadata via userdata?

A

Yes

17
Q

What are the 3 types of network adapters for ec2?

A
  1. ENI - elastic network interface
  2. EN - enhanced networking
  3. EFA - elastic fabric adapter
18
Q

What are use cases for ENI?

A

everyday networking, dual homed instances, interact with VPC or different networks

19
Q

What are use cases for EN?

A

High performance I/O, high bandwidth, lower latency, single root virtualization. 10-100Gbps

20
Q

What are the 2 types of EN? Which should you always choose?

A
  1. ENA - elastic network adapter
  2. VFI - virtual function
    always choose ENA
21
Q

What are use cases for EFA?

A

HPC, machine learning, OS bypass

22
Q

What are the 3 types of placement groups?

A
  1. Clustered
  2. Partitioned
  3. Spread
23
Q

What is Clustered Placement group?

A

Instances are grouped together into the same AZ

24
Q

Why use Clustered placement group?

A

Low latency, network throughput, HPC

25
Q

What is Partitioned Placement group?

A

Multiple Instances are partitioned where partitions are on different racks/hardware

26
Q

What is Spread Placement group?

A

Individual Instances are placed on their own distinct hardware

27
Q

Why use a Spread Placement group?

A

Keep small # critical instances separate from another

28
Q

Why use a Partitioned Placement group?

A

Isolate impact of power/network failures. For distributed systems like HDFS, Cassandra

29
Q

What Placement group can span multiple Az’s and what can’t?

A

Clustered cannot span multiple AZ’s

Partitioned and Spread can span

30
Q

Can you merge placement groups?

A

No you can’t merge

31
Q

Can you remove/add existing instances into a placement group? The instance has to be in what state?

A

Yes, but the instance must be stopped

32
Q

When should you use EC2 dedicated hosting?

A

When you need dedicated physical hardware due to compliance or licensing

33
Q

When should you not use spot instances?

A
  1. Critical workloads
  2. Databases
  3. Persistent workloads
34
Q

What are some use cases for spot instances?

A
  1. CI/CD
  2. containerized workloads
  3. high performance computing
  4. Big data analytics
35
Q

How much can you save with spot instances?

A

up to 90% savings

36
Q

How do spot instances work?

A

You set a max spot price, and spot instances will be provisioned if it is below this price

37
Q

What is a Spot Block?

A

Stops spot instances from being terminated if the price goes above your max spot price. Can be set for 1-6 hours.

38
Q

What is a spot request? What are the 2 types?

A

Defines the spot price max, # instances you want, launch template, valid time range, request type.

  1. Onetime spot request
  2. Persistent Spot request (keeps provisioning instances until request is met if open/price)
39
Q

What do you need to do to terminate instances in a persistent spot request?

A

You need to cancel the spot request first to prevent it from reprovisioning instances, then terminate instances