EC2 Flashcards

1
Q

What is EC2?

A

EC2 is AWS’s VM in the cloud service

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

What are the 4 types of EC2 instances? (pricing)

A

1) On demand
2) Reserved
3) Spot
4) Dedicated hosts

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

What is EBS?

A

Elastic Block Store

A virtual disc in the cloud.

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

Is termination protection enabled by default?

A

No

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

What happens to the root EBS volume when an instance is terminated?

A

It is deleted

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

What happens to an additional EBS volume when an instance is terminated?

A

It is NOT deleted!

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

Can EBS volumes be encrypted?

A

Yes

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

What is a security group?

A

A security group is a virtual firewall that controls the traffic for one or more instances. You can assign a security group to instances or select a default security instance

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

What are the default inbound outbound traffic rules of a new security group?

A

All inbound traffic is blocked by default and all outbound traffic is allowed.

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

What do changes to a security group take effect?

A

Immediately

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

Can you have multiple security groups attached to an EC2 instance?

A

Yes

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

Are security groups stateful or stateless? and what does this mean?

A

They are stateful…. When you open a port you open for both outbound and inbound traffic

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

Can you block specific IP addresses in an security group?

A

No for that you will need to use an NACL

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

What is a NACL?

A

Network access control list.

An optional layer of security that acts as a firewall for controlling traffic in and out of one or more subnets

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

Can you specify deny rules in a security group?

A

No, you can only specify allow rules.

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

Name 2 SSD based EBS volume types…

A

1) General purpose SSD- gp2

2) Provisioned IOPS SSD- i01

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

Name 3 magnetic based EBS volume types…

A

1) Throughput optimised- st1
2) Cold HDD- sc1
3) Magnetic

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

What is the use case for a gp2 EBS volume?

A

Most workloads

Max IOPS= 16,000
Volume size= 1GB-16TB

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

What is the use case for a io1 EBS volume?

A

e.g. a EC2 based database that are mission critical!

Max IOPS= 64,000
Volume size= 1GB-16TB

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

What does IOPS stand for?

A

Inputs/outputs per second

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

What is the use case for a st1 volume?

A

Throughput intensive big data workloads

Max IOPS= 500
Vol size=500GB-16TB

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

What is the use case for a sc1?

A

File severs

Max IOPS= 250
Vol size= 500GB-16TB

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

What is the use case for Magnetic?

A

Workloads that are infrequently accessed

Max IOPS= 40-200
Vol size= 16GB-1TB

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

Can you have a EBS in a different AZ to an the EC2 instance interacting with it?

A

No, the EC2 instance and EBS volume must be the same AZ

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

What is snapshot?

A

A snapshot is a copy of an EBS volume. They exist on S3. These are point in time copies of volumes. They are incremental.

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

What should you do to take a snapshot of a root EBS volume?

A

Stop the EC2 instance before creating the snapshot

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

Can you create AMI’s from volumes and snapshots?

A

Yes

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

Can you change EBS volume sizes on the fly? including storage type?

A

Yes

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

What are the 3 steps to move a EBS volume from one AZ to another?

A

1) Take a snapshot
2) Create and AMI
3) Use AMI to launch an EC2 instance in a new AZ

30
Q

What are the 4 steps to move an EBS volume from one AZ to another region?

A

1) Create a snapshot
2) Create an AMI
3) Copy AMI from one region to another
4) Use AMI to launch an EC2 instance in the new region

31
Q

Are snapshots of encrypted volumes encrypted by default?

A

Yes

32
Q

Are volumes restored from encrypted snapshots encrypted?

A

Yes

33
Q

Can you share snapshots with other AWS accounts or the public?

A

Yes, but only if they are not encrypted

34
Q

Can root volumes be encrypted?

A

Yes, AWS have made it easy to encrypt a root volume with one click, however this can be done manually.

35
Q

What is the manual process of encrypting a root volume?

A

1) Create a snapshot of the unencrypted root volume
2) Create a copy of the snapshot and select the encrypt option
3) Create an AMI from the encrypted snapshot
4) Use this AMI to launch new encrypted instance with encrypted root volumes

36
Q

What is an instance store?

A

An instance store provides a temporary block-level storage for your instance. The storage is located on discs that are physically attached to the host computer (physical hardware in AWS).

37
Q

What is another name for an instance store?

A

Ephemeral storage

38
Q

What happens to data stored in an instance store if the underlying host fails?

A

The data is lost.

39
Q

What happens to data stored in an instance store if you reboot the instance attached to it?

A

You will not loose your data.

40
Q

What is happens by default to a root EBS voume?

A

The root EBS volume will be deleted. Hoever, this setting can be changed to persist the root EBS volume

41
Q

What is CloudWatch used for?

A

CloudWatch is used to monitoring performance of AWS environment and you can set alarms which can trigger notifications.

42
Q

What is CloudTrail used for?

A

CloudTrail is used to monitor all API calls within the AWS environment and this information is used for audit purposes.

43
Q

What are 4 key features of CloudWatch?

A

1) Dashboards
2) Alarms- alert when threshold is reached
3) Events- Helps you respond to changes in AWS resources
4) Logs- Aggregate, monitor and store logs

44
Q

What is a Role?

A

An IAM identity that you can create in your AWS account that has specific permissions. An IAM role is similar to an IAM user in that it has an AWS identity with permissions and policies that determine what the identity can and cannot do in AWS.

45
Q

Why use a role?

A

A role is more secure than storing your access ID and access key on an EC2 instance and they are easier to manage.

46
Q

Can a role be assigned to an EC2 instance after it is created using the console?

A

Yes

47
Q

Are roles universal?

A

Yes

48
Q

What is a bootstrap script?

A

A bootstrap script is a script that is run when an EC2 instance first boots. This can be used to automate the installation of software and to complete updates.

49
Q

What is instance and user metadata?

A

Instance metadata is data about your instance that can be used to configure or manage the running of an instance. e.g. public IP address

User data information about the user e.g. user_id value

50
Q

What is the URL used to access instance and user data from an EC2 instance?

A

http: //193.84.224.252/latest/meta-data/
http: //193.84.224.252/latest/user-data/

51
Q

What is EFS?

A

Linux based Elastic File System.

File system in the cloud. EC2 instances can then mount the directories in EFS

You can also mount on premise file systems using DirectConnect.

Grows and shrinks as required. Stores across multi AZs

Only pay for what you use.

52
Q

What protocol does EFS support?

A

Supports the NFSv4 protocol

53
Q

What is are EC2 placement groups used for?

A

A method of grouping all of your instances across underlying hardware to minimise correlated failures

54
Q

What are the 3 placement groups available for EC2?

A

1) Clustered placement group
2) Spread placement group
3) Partition placement group

55
Q

What is a clustered placement group?

A

A clustered placement group is a method of grouping EC2 instances within a single AZ.

56
Q

What is the use case for a clustered placement group?

A

If an app required low network latency or high network throughput or both!

remember only certain types of EC2 instances can be placed in a clustered placement group

57
Q

What is a spread placement group?

A

A spread placement group is a group of instances that are each placed on distinct underlying pieces of hardware.

58
Q

What is the use case for a spread placement group?

A

A spread placement group is recommended for apps that have a small number of critical instances that should be kept separate from each other. This is usually on different racks in 1 AZ, but can span multiple AZs.

59
Q

What is a partition placement group?

A

A partition placement group divides parts of racks to house EC2 instances. These are divided into logical segments called partitions. No two partitions within a placement group share the same rack.

60
Q

What is the use case for a partition placement group?

A

The customer would like to reduce correlated failures for large workloads. This is required to run applications like Hadoop, Hbase, Kafka and Aerospike within a single AZ.

61
Q

Can you merge EC2 placement groups?

A

No

62
Q

Can add an existing instance into a placement group? and how would you do this?

A

No, you would need to create and AMI from the EC2 instance and then launch a new instance from the AMI into a placement group.

63
Q

Which EC2 placement groups cannot be spread across multiple AZs?

A

Spread and partition placement groups can be spread across AZs. Clustered placement groups cannot.

64
Q

What are the underlying hypervisors used to create EC2 instances? (choose 2)

A

1) Xen

2) Nitro

65
Q

What do you assume when a question specifies that a number of EC2 instances is required (100% fault tolerance)?

A

That you will loose the AZ with the most instances!

66
Q

What is the cheapest type of EBS volume?

A

HDD based volumes e.g. sc1 and st1

67
Q

What is the main limitation of a spread placement group?

A

That you can only have a maximum of 7 running instances per AZ

68
Q

What type of storage is EBS? (block based or object)

A

Block based…. the clue is in the name

69
Q

Name 3 ways to improve the performance of an EBS volume in addition to choosing the correct EBS volume type for your specific task.

A

1) Schedule snapshots of HDD based volumes for periods of low use
2) Ensure that EC2 instances are types that can be optimised for use with EBS
3) You can stripe volumes together in a RAID 0 configuration

70
Q

How many instances can I run on EC2?

A

Limit applies to the number of vCPUs that you are running (on demand) e.g. standard instances – 1152vCPUs