EC2 Flashcards

1
Q

What is one of the main limitations of EC2 and its associated EBS volume?

A

It’s all AZ specific e.g. Network interface or EBS cannot cross/connect AZ’s they are isolated

AMI’s etc covered separately

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

What is EC2 good for?

A
  • Long-running compute
  • Server style apps
  • Burst or steady-state load
  • Monolithic application stacks
  • Migrated app workloads or DR

STRENGTH - blast radius within one AZ

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

What type of workload would you use general purpose EC2 type for?

A

Default - Diverse workloads, equal resource ratio

Should use this type as starting point

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

What type of workload would you use Compute Optimised EC2 type for?

A

Media processing, HPC, Scientific modelling, gaming, machine learning

Offer high performance CPUs

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

What type of workload would you use Memory Optimised EC2 type for?

A

Processing large in -memory datasets, some database workloads

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

What type of workload would you use Accelerated Computing EC2 type for?

A

Hardware GPU, Field programmable gate arrays (FPGA’s)

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

What type of workload would you use Storage Optimised EC2 type for?

A

Sequential and random IO - scale-out transactional db’s, data warehousing, elasticsearch, analytics worklaods

Large amounts of fast local storage, many io ops per second

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

How is storage throughput calculated? and how do you maximise

A

IO (block) Size x IOPS = Throughput

i.e. IO is like size of wheels on the car

E.g. 16k, 64k, 1Mb x 1, 2 seconds = xx MB/S

Maximising either will increase throughput although there are maximums depending on type of storage

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

Is EBS resilient across multiple AZ’s?

A

Volume = ONE AZ, but HA/Resilient in that AZ

If entire AZ has issues then could go down

Can be SSD or HDD (varying performance iops)

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

How is EBS billed?

A

Billed GB/M ( amount of time volume exists and size) IF you use for half month then less etc.

GB/M fee regardless of instance state

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

What are the 4 EBS volume types?

A
  • General purpose SSD (gp2)
  • Provisioned IOPS SSD (io1)
  • Throughput optimised HDD (st1)
  • Cold HDD (sc1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the dominant performance attribute of each of the 4 EBS volume types?

A
  • General purpose SSD (gp2) IOPS
  • Provisioned IOPS SSD (io1) IOPS
  • Throughput optimised HDD (st1) THROUGHPUT MiB/s
  • Cold HDD (sc1) THROUGHPUT MiB/s
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In what situation would you choose Provisioned IOPs SSD (io1)?

A

IO1 should be used when:

  • High IOPs
  • Latency
  • Ability to pick performance separate from size
  • Small volume sizes with high IO requirements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

When can instance store volumes be attached to an EC2 instance?

A

Only at launch

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

How long does the data persist for on an instance store volume?

A

Storage is temporary/ephemeral as a result non-persistent and lost on instance restart, resize or hardware failure

Trade off is that instance store volumes have the highest performance

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

Why use EBS?

A
  • Highly available and reliable storage
  • Persist independently from EC2 instance
  • Clusters - multi attach feature of io1
  • Region resilience backup (can be automated vs instance store)
  • If you only require up to 64,000 IOPS and 1000 MiB/s per VOLUME OR
  • Up to 80,000 IOPS and 2,375 MB/S per INSTANCE
17
Q

Why use instance store?

A
  • Great value (included in the price of the instance provisioned) if you don’t care about it being permanent
  • Performance is superior as its directly connected more than 80,000 IOPS & 2,375, good for caching speeds etc. like db products
  • Stateless services e.g. web services that do media processing, temp storage
  • You want to guarantee no data is left over when the system is terminated or restarted etc
18
Q

How can you improve resilience of EBS volumes and make snapshots region resilient?

A

Store them on S3

19
Q

How can you migrate or copy EBS volumes to other AZ’s or regions?

A

Use of snapshots, can be attached to other EC2 instance

To aware of:

  • Snaps restore lazily - fetched gradually therefore reads in the interim may happen from S3 which is slower performance
  • Can force a read of data immediately (pulling all data from S3 to new volume hence good performance immediately (use FSR - fast snapshot restore, 50 per region limit and costs extra)
20
Q

If a snapshot of an encrypted EC2 is created which encryption key will be used to decrypt?

A

The same one used to encrypt will be used to decrypt via KMS. Brand new EBS volume will have new key.

Exam power ups:

  • OS is not aware of the encryption - no performance loss
  • Can’t change volume to not be encrypted
  • AWS accounts can be setup to encrypt by default - default CMK
21
Q

How many regions can an AMI work in?

A

One Region, only works in one region

Can be copied between regions (includes snapshots)

22
Q

How can you edit an AMI?

A

AMI cannot be edited.. launch instance, update configuration and make a new AMI

Permissions are defaulted to your account

23
Q

What is the best practice way to grant AWS services permissions to other AWS services on your behalf?

A

IAM Role - can allow service to assume role e.g. EC2 instance roles can allow anything running in the instance to assume - must create an ‘instance profile’ on EC2.

Instance Roles - credentials inside the meta-data, iam/security-credentials/role-name, cred are auto rotated hence always valid, app need to be careful about caching

Should ALWAYS use roles as opposed to access keys