EC2 Flashcards

1
Q

What is EC2?

A

Elastic Compute Cloud. It provides resizable capacity in the cloud. Can scale capacity up and down. Only pay for capacity you use.

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

Pricing of On Demand EC2 Server

A

Fixed rate by hour (or second) with no commitment

Good for apps with short term spiky or unpredictable workflows

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

Pricing of Reserved EC2 Server

A

Provide with capacity reservation getting a discount on hourly charge for instance.

Must set for 1-3 year terms

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

Reserved Instance EC2 types and % discount

A

Standard RI
- up to 72% discount

Convertible RI

  • up to 54% off
  • feature capability to change attributes of RIs as long as exchange is equal or greater value

Scheduled RI

  • Available to launch within time window you reserve.
  • Good for predictable schedule
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a Spot Instance?

A

EC2 instance where you big price you want on instance capacity.

Great for apps with flexible start and end times

Up to 90% discount

Fluctuates based on supply and demand

Good for users w/ urgent need for large amounts of additional computing capacity

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

What are EC2 Dedicated Hosts?

A

Most expensive EC2 Server (physical server).

But, it can help reduce cost by allowing you to use existing server bound software.

Also can be purchased as a reservation for up to 70% off on demand price.

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

How can you access the private and public IP address of an EC2 Instance?

A

Use CURL or GET to access the instance metadata

URI: http://169.254.254/latest/meta-data/Instance

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

What is the EC2 Savings Plan?

A

A feature of AWS that allows you to save up to 72% on EC2. You must commit for 1-3 years. It is super flexible and includes other serverless tech such as Lambda and Fargate.

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

How can I add storage volumes on EC2?

A

Use EBS (Elastic Block Store) volumes.

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

How can you add metadata to an EC2 instance?

A

Use tags

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

How to launch an encrypted EBS-backed EC2 instance from an unencrypted AMI?

A

Create an encrypted copy of the AMI. Then use that AMI to launch the EC2 instance.

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

What is an EC2 Spot Fleet?

A

A group of Spot and optional On-Demand Instances. AWS will launch a number based on the specified target capacity. It will be fulfilled if the max price you picked exceeds current Spot Price.

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

What is an EC2 Spot Instance Pool?

A

Set of unused EC2 instances. They will all have the same instance type, operating system, AZ, and network platform.

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

Describe the 3 allocation strategies for Spot Instances

A

Lowest Price

  • Default
  • Spot Instances come from pool with lowest price

Diversified
- Spot instances come from across all different pools (distributed)

CapacityOptimized
- from pool w/ optimal capacity

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

Can you copy an AMI from one region to another?

A

Yes, but there will be a transfer charge

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

What is an EC2 security group?

A

You can attach a security group to an EC2 instance that acts like a virtual firewall. It can be used to control traffic (for 1 or more instance).

These can be edited at any time and new rules will be applied immediately.

17
Q

What is an Elastic IP address?

A

Static IPv4 address for dynamic cloud computing. You can remap the address to another instance in your account if there is an instance failure.

You will need this if you do not auto-assign a public IP address.

There is a limit of 5 per region.

18
Q

How can you distribute traffic among instances?

A

Use and Elastic Load Balancer

19
Q

How to access a VPC instance for management using SSH or RDP from an EC2 instance?

A

Configure the EC2 instance as a bastion host

20
Q

How to accelerate ML apps and perform High Performance Computing on an EC2 instance?

A

Attach a Elastic Fabric Adapter (EFA) to your EC2 instance.

21
Q

What does CloudWatch Agent monitor for EC2?

A

Memory utilization
disk swap utilization
disk space utilization
page file utilization

Note CloudWatch Agent must be installed on EC2 server

22
Q

How to retrieve user data from running instance?

A

http://169.254.169.254/latest/user-data

23
Q

What happens if you stop an instance, modify its user data, and start the instance?

A

Modified user data is lost.

Note user data is limited to 16KB

24
Q

Service that provides scalable file storage for EC2

A

Elastic File System (EFS)

25
Q

What is the EC2 User Data used for?

A

After instance is started, runs auto configuration tasks and scripts

26
Q

What is an EC2 placement group?

A

It determines how instances are placed on underlying hardware

27
Q

List strategies for EC2 placement groups

A

Cluster
- puts instances into a low-latency group in a single AZ

Spread
- spreads instances across underlying hardware

28
Q

How to detach a EBS root volume from an EC2 instance?

A

Stop instance and then detach the volume