EC2 Flashcards

1
Q

Instance pricing models

A

On Demand, Spot, Reserved, Dedicated Hosts

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

If you terminate spot instance

A

you pay for the hour. If AWS terminates it, you are not charged for the hour

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

Instance types

A

DRMCGIFTPX

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

EBS types

A

SSD, General Purpose - GP2 (up to 10k IOPS)
SSD, Provisioned IOPS - IO1 (> 10k IOPS)
HDD, Throughput Optimized - ST1 (frequently accessed workloads)
HDD, Cold - SC1 (less frequently accessed data)
HDD, Magnetic Standard (cheap, infrequently accessed storage)

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

Can you mount 1 EBS volume to multiple EC2 instances?

A

No, use EFS instead

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

Termination protection

A

is turned off by default, you must turn it on

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

On an EBS-backed instance, the default action is for the root EBS volume

A

to be deleted when the instance is terminated

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

Can root volumes be encrypted by default?

A

No, you need a third party tool to encrypt the volume. Additional volumes can be encrypted

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

Volumes exist on

A

EBS. virtual hard disk

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

Snapshots exist on

A

S3

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

Can you take a snapshot of a volume?

A

Yes, this will store that volume on S3

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

What are snapshots?

A

point in time copies of Volumes

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

Snapshots are incremental, so

A

only the blocks that have changed since your last snapshot are moved to S3

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

First snapshots

A

may take some time to create

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

Snapshots of encrypted volumes

A

are encrypted automatically

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

Volumes restored from encrypted snapshots

A

are encrypted automatically

17
Q

Can you share snapshots?

A

Yes if they are unencrypted. these snapshots can be shared with other AWS accounts or made public

18
Q

to create a snapshot for EBS volumes that serve as root devices,

A

you should stop the instance before taking the snapshot

19
Q

Instance store volumes are sometimes called

A

ephemeral storage

20
Q

Can instance store volumes be stopped?

A

No, if the underlying host fails, you will lose your data

21
Q

Can EBS volumes be stopped?

A

Yes, you will not lose data if it is stopped

22
Q

Can you reboot volumes?

A

Yes for both, you will not lose data

23
Q

By default, both root volumes

A

will be deleted on termination, but you can tell AWS to keep the root EBS volume

24
Q

How to take snapshot of a raid array?

A

take application consistent snapshot to prevent excluding data. stop the app from writing to the disk + flush all caches to the disk. freeze file system or unmount raid array or shut down associated instance

25
Q

Are AMIs global or regional?

A

Regional. You can only launch an AMI from the region in which it is stored. However you can copy AMIs to other regions using the console, command line or API

26
Q

CloudWatch

A

standard=5 mins, detailed=1 min

27
Q

CloudWatch is for

A

performance monitoring

28
Q

CloudTrail is for

A

auditing

29
Q

With CloudWatch you can do

A

Dashboards, Alarms, Events, Logs

30
Q

Which is more secure, Roles or storing access key ID/secret access key on instances?

A

Roles, they are also easier to manage

31
Q

Can roles be assigned to an EC2 instance after it’s created?

A

Yes but only using the command line

32
Q

Are roles universal?

A

Yes

33
Q

Instance metadata

A

used to get info about instance (e.g. public ip)

curl http://169.254.169.254/latest/meta-data/

34
Q

Is there user data for an instance?

A

No

35
Q

EFS features

A

supports NFSv4, only pay for storage you use, can scale up to petabytes, can support thousands of concurrent NFS connections, data is stored across multiple AZs in a region

36
Q

Consistency of EFS

A

read after write

37
Q

Lambda

A

compute service where you upload your code and create Lambda function. AWS takes care of provisioning and managing servers you use

38
Q

Use Lambda as

A

event-driven compute service where Lambda runs your code in response to events, as compute service to run your code in response to HTTP requests using API Gateway or API calls made using AWS SDKs