EC2 Instance Storage Flashcards

1
Q

What is EBS?

A

Elastic Block Store. It’s a network drive that you can attach to EC2 instances. You have to provision size and IOPS in advance.

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

How many EC2 instances can an EBS be attached to?

A

Typically one, though some have a multi-attach feature (IOPS provisioned instances).

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

When is an EBS volume deleted?

A

Either manually by you, or if “delete on termination” attribute is set, it’s deleted when the attached instance is. This is the default for a root volume.

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

How can I move a volume across AZ or region?

A

Snapshot it then move the snapshot. It’s recommended to detach the volume first for snapshotting, but it’s not required.

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

AMI vs Snapshot?

A

AMI is an image of an EC2 instance. It includes snapshots of attached drives (by creating hidden EBS snapshots of them), and the instance store if it has one.

“Snapshot” typically refers to an EBS volume.

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

How can I get an AMI?

A

There’s public AMI available for free; you can create an AMI from an EC2 instance; there’s a 3rd party marketplace that you can purchase them from.

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

What is EC2 instance store? How does it compare to EBS?

A

EBS volumes are network drives that have limited performance because they run over a network.

If you need a high-performance hardware disk, use EC2 instance store, it has significantly higher I/O performance. The trade-off is that it’s EPHEMERAL, you lose it if the hardware fails. Backups and replication are your responsibility. Works well for caching, scratch data, temporary content - stuff that you can rebuild if it’s lost.

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

What are the four EBS volume types?

A
  • Gp2 / gp3 (SSD): general purpose SSD that balances price and performance. GP means “general purpose”. Good for a broad range of workloads.
  • Io1 / io2 (SSD): highest-performance SSD for mission-critical low-latency or high-throughput workloads. IO means “provisioned iops”
  • St1 (HDD): low cost HDD designed for frequently accessed, throughput-intensive workloads.
  • Sc1 (HDD): lowest cost HDD drive for less frequently accessed workloads. “c” stands for “cold”.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What EBS volume type should I get if I need frequently accessed, throughput-intensive workloads + cost savings?

A

ST1

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

What EBS volume type should I get for infrequently accessed, high-throughput workloads + cost savings?

A

SC1

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

What EBS volume should I get if I need the highest possible performance?

A

IO2/IO1

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

What’s a good general purpose EBS volume type?

A

GP2/GP3

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

Can any drive be used as a boot volume?

A

No, only SSD drives.

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

Good EBS volume type for:

  • low latency interactive apps
  • development and test environments
A

gp2/gp3

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

Good EBS volume type for:

  • big data
  • data warehouses
  • log processing
A

st1

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

Good EBS volume type for:

  • scenarios where the lowest storage cost is important
  • thoughput-oriented storage for data that is infrequently accessed
A

sc1

17
Q

Good EBS volume for:

  • EBS multi-attach
  • Database workloads
A

io1/io2

18
Q

What is multi-attach useful for?

A

Gives you higher HA in clustered linux applications. Each instance has full read/write permissions, so apps must manage concurrent write operations: you need a file system that’s cluster-aware.

Can attach to multiple EC2 instances in the same AZ.

19
Q

If I create a volume from an encrypted snapshot, is it encrypted?

A

Yep.

20
Q

If I create a snapshot from an encrypted EBS volume, is it encrypted too?

A

Yep.

21
Q

What is RAID 0, and when would you use it?

A

Also known as “raid striping”. Increase performance by using an array of multiple volumes as a single volume. Higher risk of faults - if one fails, they all do.

Use case would be if you need a ton of IOPS but don’t need fault-tolerance, or a DB with built-in replication.

22
Q

What is RAID 1, and when would you use it?

A

Also know as “raid mirroring”. Increases fault tolerance by duplicating a drive to once or more drives.

Because we have to send the data twice, this is 2x the network throughput :(

Use case is when you need more fault tolerance (and don’t trust AWS to do it), or an application where you need to service disks.

23
Q

What RAID are supported by AWS?

A

Only 0 and 1. Does not support 5 or 6.

24
Q

What is EFS?

A

Elastic file system. It’s a HA, scalable, pay per use drive that you can attach to instances. You can create multiple EFS for a region.

25
Q

Can EFS be attached to multiple regions? Multiple AZ?

A

It works between AZs, but only on the same region.

26
Q

Can you use EFS for Windows?

A

No.

27
Q

How is EFS priced?

A

It’s about 3x the cost of a GP2 drive on a per-GB bases, but you only pay for the GBs you keep on it, not for the whole drive.

28
Q

What protocol does EFS use?

A

NFSv4.1

29
Q

What are good use cases for EFS?

A

Content management, web serving, data sharing, wordpress. The big advantages are that it’s really performant, HA, scalable, can be attached to 1000s of clients.

30
Q

What is security like for EFS?

A

You use sec groups for access to EFS. There’s encryption at rest through KMS.

31
Q

How can an EFS drive be configured?

A

“General purpose” EFS is the default. If you want even better latency, throughput, or want to do highly parallel work, there’s a “max i/o” performance mode.

These have to be set at creation time.

“Bursting throughput” is the default EFS storage class. You can choose “provisioned throughput” if you want to provision it.

32
Q

How can I save money with EFS?

A

Just like S3, there’s EFS storage classes for infrequent access, one-zone, one-zone IA. Like S3, you have to pay fees for accessing infrequently accessed files.

And just like S3, you can enable lifecycle management for files.