A Cantrill - EC2 Basics & Advanced Flashcards

1
Q

Can you use EBS (Elastic Block Store) in multiple AZs?

A

No. EBS is limited to ONE AZ only

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

What type of storage is EBS?

A

EBS is a persistent data storage type.

EBS backups are called Snapshots which backup to S3.

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

How is EBS billed?

A

GB per month basis

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

Instance stores MUST be attached to an EC2 at launch, T or F?

A

True. Instance stores cannot be attached to an Instance AFTER it is already running

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

What type of storage is Instance Store?

A

Ephemeral. If the instance is stopped or moves hosts, the instance datastore is lost.

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

What is the pricing for instance store?

A

It is included in the price of your EC2 instance.

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

What type of backups are EBS Snapshots?

A

Incremental volume copies to S3.

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

what is the difference between restarting an EC2 AND “stopping and starting” an EC2?

A

-Restarting an EC2, the EC2 will stay on its host
-Stopping and starting an EC2, the EC2 will move hosts

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

What kind of a key is used for each EBS volume? Default KMS key or single unique DEK?

A

Each volume uses 1 unique DEK. And these snapshots and future volumes will use the SAME DEK

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

Every EC2 has at least one __?

A

ENI.
All EC2s need at least 1 ENI.

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

All ENIs have what ?

A

MAC Address and a primary IPv4 IP. The IPs are on the ENI, NOT the actual EC2

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

What happens to an IPv4 public IP when the EC2 is Stopped & Started?
What can be done to prevent a public IPv4 address from changing on an EC2?

A

-IPv4 public IPs are dynamic, so when you stop and start the EC2, the Public IP WILL change.
-Assign the EC2 an Elastic IP

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

AMI work only in 1 region (t or f)?

A

AMIs work in only one region. But can be copied into a other regions.

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

What is AMI baking?

A

Creating an AMI from configured AMI plus an application loaded automatically

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

Are AMIs editable?

A

No, once an AMI is created you cannot change it. Need to make a new AMI

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

If an AMI snapshot is copied over to another Region, is it the same AMI ?

A

When an AMI snapshot is copied over to another region, the new AMI is a different AMI. Same data but it is a different ID

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

If a company is moving off regular servers (EC2s) and onto serverless or container architecture (Lambda, Fargate) what should they utilize to save $?

A

EC2 savings plan can be a good tool for a company moving off ec2s

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

What service can be used to automatically recover EC2s that fail status checks ?

A

CloudWatch alarms can monitor the EC2 and automatically recover the instance if it becomes impaired due to an underlying hardware failure or a problem that requires AWS involvement to repair.

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

What is the instance metadata address inside ALL instances?

A

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

20
Q

What kind of use-case suits using IO1 EBS volumes?

A

When Maximum Consistent IOPS is a priority and data is important

21
Q

What is the limit of size for user data in EC2?

A

Data size limit for user data is 16KB

22
Q

On a bootstrapped EC2, what files are used to diagnose user data related issues? And where are these files located?

A

cloud-init-output.log
cloud-init.log

Both are located in /var/log

23
Q

What IAM feature allows Lambda to interact with other AWS services?

A

Lambda Execution Roles: Provide permissions for Lambda functions to interact with other AWS services.

24
Q

Where is Parameter Store located? (what service)

A

Parameter Store is located in AWS Systems Manager.

25
Q

What is the advantage of Cluster Placement Groups?

A

Performance. EC2s are always in the same rack, SOMETIMES on the same host.

**One AZ only

Recomended that same type is launched. AND VERY recommended to launch at the same time

26
Q

What is the Advantage of Spread Placement Groups?

A

Resilience, infrastructure isolation. Each instance has its own rack and power source.

Use Case: Small # of critical instances that need to be kept isolated from each other

27
Q

What is the Advantage of Partition Placement Groups?

A

designed for huge scale parallel processing systems.

Topology Awareness. More control than Spread. 7 Partitions per AZ

28
Q

What is the difference between Spread and Partition placement groups?

A
29
Q

If you run a large application which uses 100’s of EC2 instances and it needs exposure to physical location for performance and availability reasons. Which placement group should you use?

A

Partition placement group

30
Q

How can permissions be provided to an application running in EC2 using best practices?

A

Instance Profile and IAM role.

31
Q

How many AZs can be used by a cluster placement group?

A

cluster placement group can utilize ONE AZ only

32
Q

How many instances can be within a spread placement group?

A

7 Instances per AZ

33
Q

What is the cost of each EC2 running on a dedicated host?

A

There is no cost for EC2s on a dedicated host, only the cost of the HOST itself.

34
Q

What are On-Demand Capacity reservations?

A

On-Demand Capacity Reservations enable you to reserve compute capacity in a specific AZ for any duration.

-ensure that you always have access to EC2 capacity when you need it, for as long as you need it.

35
Q

What is a scenario in which a customer would want to use On-Demand Capacity Reservations?

A

When a customer requires compute capacity for a specific time of day consistently. Also when compute in a specific AZ is needed.

Example - A company runs batch processing from 10PM to 3 AM every night.

36
Q

Where are EBS volume snapshots stored?

A

EBS Volume snapshots are sent to Amazon S3.

37
Q

What makes EBS a good storage choice for situations that need minimal downtime or service interruption?

A

EBS volumes support live configuration changes while in production which means that you can modify the volume type, volume size, and IOPS capacity without service interruptions.

38
Q

What is Amazon Data Lifecycle Manager (Amazon DLM)?

A

Amazon Data Lifecycle Manager (Amazon DLM) to automate the creation, retention, and deletion of snapshots taken to back up your Amazon EBS volumes. Automating snapshot management helps you to:

– Protect valuable data by enforcing a regular backup schedule.

– Retain backups as required by auditors or internal compliance.

– Reduce storage costs by deleting outdated backups.

39
Q

What should be done to ensure unencrypted EBS volumes are automatically encrypted when they are restored?

A

Enable the EBS Encryption By Default feature for the AWS Region.

40
Q

When a scale-in policy occurs in default, what determines the first EC2s to be terminated in your ASG?

A
  1. If multiple AZs, choose one with most instances in it.
  2. The EC2 instance launched from the oldest launch template.
  3. EC2s closest to the next billing hour
  4. if none of above, chooses an unprotected instance at random
41
Q

When you have a new AMI to use in your ASG, what needs doing to ensure the new AMI is used ?

A

Create a new launch template with the new AMI

42
Q

What is the default cooldown period and behavior for ASGs?

A

Default cooldown period is 300 seconds (5 mins) and cooldown ensures that the Auto Scaling group does not launch or terminate additional EC2 instances before the previous scaling activity takes effect.

43
Q

What are the ASG policies available?

A

Target tracking scaling – Increase or decrease the current capacity of the group based on a target value for a specific metric. This is similar to the way that your thermostat maintains the temperature of your home – you select a temperature and the thermostat does the rest.

Step scaling – Increase or decrease the current capacity of the group based on a set of scaling adjustments, known as step adjustments, that vary based on the size of the alarm breach.

Simple scaling – Increase or decrease the current capacity of the group based on a single scaling adjustment.

44
Q

are ebs snapshots encrypted?

A

EBS snapshots are encrypted.

45
Q
A