Elastic Cloud Compute (EC2) Flashcards

1
Q

List the 4 Pricing Options for EC2 Instances Most expensive to Least expensive

A

(1) Dedicated Host
(2) On-Demand
(3) Reserved
(4) Spot

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

What is the use case for On Demand EC2 Instances

A
  • General production workloads
  • Pay as you go
  • Pay only for what you use.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the use case for Reserved EC2 Instances

A

A variation on on-demand where you sign a contract for 1-3 years to get big discounts

You pay less the more you pay upfront, and the longer the term

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

What is the use case for Spot EC2 Instances? How does it work?

A
  • How it works
    • Analogous to eBay. you “bid” on unused compute capacity, getting up to a 90% discount. The prices fluctuate with supply and demand.
  • Typical Use Cases
    • Fault-tolerant apps with flexible use patterns
    • Spikey workloads
    • Stateless applications
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the use case for Dedicated Host EC2 Instances

A

Physical EC2 Instance for your own use. Typically used for hardware bound licenses.

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

What is different about a convertible reserved instance?

A

Cheaper than on demand, more expensive than reserved instances. Allows you to change the class of the EC2 instance.

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

What is the preferred method for granting access to AWS resources to your EC2 Instance

A
  • Assign policies to roles .. then
  • Assign those roles to resources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a bootstrap script used for?

A

Runs with root access, runs commands in your EC2 instance when starting.

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

Are security groups open or closed by default?

A
  • Default security groups are CLOSED (inbound) by default.
    • You must add access to the ports you want access to the EC2 instance. Outbound traffic is allowed.
  • Up to 5 security groups may be associated with an EC2 instance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is user data vs metadata?

A

User data is the startup script. Metadata is the data about the server. Both can be accessed with a specific URL to the EC2 instance.

http://169.254.169.254/latest/meta-data

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

What are the networking options with EC2 ordered from least to most performant?

A

(1) ENI - elastic Network Interface
(2) EN = Enhanced Network
(3) EFA - Elastic Fabric Adapter

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

What is the use case for ENI (Elastic Network Interface)

A
  • Basic networking
  • Low budget, high availability
  • < 10gbps network speed
  • Allows you to set up separate networks (Example: Production vs QA)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the use case for EN (Enhanced Networking)? What are the two types of EN?

A
  • Higher Performance
  • Lower Latency
  • Network speeds from 10-100Gbps
  • Variants include
    • ENA (better choice)
    • VF
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the use case for EFA and what does it stand for?

A
  • Very high performance
  • Used for HPC and Machine learning
  • OS-bypass for Linux only
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the types of EC2 Placement Groups

A
  • Cluster
  • Partition
  • Spread
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe an EC2 “Cluster” placement group and its use case

A
  • A number of EC2 instances in the same Availability Zone
  • Cluster placement groups are only within one availability zone
  • High throughput
  • Low latency
  • Only certain EC2 types can be in a placement group
17
Q

Describe an EC2 “Spread” placement group and its use case? Whats the max number of instances in a Spread placement group?

A
  • A group of EC2 instances, each instance on separate hardware (Separate Racks)
  • Each rack has its own network and power source
  • Can be in separate Availability Zone
  • Use Cases
    • Machines must be separate from each other
    • Redundancy
    • Lowers the risk of simultaneous failures
  • Only certain EC2 types can be in a placement group (C,M,R)
  • You can have a maximum of seven running instances per Availability Zone per group.
18
Q

Describe an EC2 “Partition” placement group and its use case

A
  • Reduces the risk of correlated hardware failures for an application
  • Partition Placement group is divided into partitions that are on separate racks
  • Partitions (racks) do not share power or network
  • Instances you launch are distributed among up to 7 partitions (per Z) within the partition placement group
  • Partitions in the partition placement group may exist in multiple availability zones in a region
  • https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html#placement-groups-partition
19
Q

What is a “Spot Block”? How long can it last? Why would you use it?

A

This is when you set a Spot instance to not be terminated when its price exceeds your desired spot price for

  • 1-6 hours.
  • Allows a critical workload to finish.
20
Q

How do you terminate a Spot Instance with a persistent spot request? Why would you do it this way?

A
  • Cancel the Spot Request
  • Terminate the instance
  • If the spot request price is still available… And you terminate an instance… It would respond the instance
21
Q

What is an EC2 Spot Fleet?

A
  • Collection of instances(Spot and Reserved)
  • Tries to maintain capacity with price restraints
22
Q

What is the most popular strategy options for Spot Fleet pools?

A
  • lowestPrice
23
Q

How many EC2 Instances are you allowed per region?

A
  1. This can be raised with a support request
24
Q

What can you do with unneeded reserve instances?

A
  • Sell them on the reserve marketplace.
  • Note this is only for standard reserve instances
25
Q

What is a bastion host and what is it for?

A
  • EC2 instance meant to withstand attacks
  • Lives in public subnet
  • Has limited SSH or RDS access
  • Public or elastic IP
  • Users log into the bastion host to administer hosts in the public subnet
26
Q

What must be true to ensure you are not charged for an EIP (Elastic IP Address)

A

An Elastic IP address does not incur charges as long as all the following conditions are true:

  • The Elastic IP address is associated with an EC2 instance.
  • The instance associated with the Elastic IP address is running.
  • The instance has only one Elastic IP address attached to it.
  • The Elastic IP address is associated with an attached network interface.
27
Q

Can you specify DENY rules in a security group?

A

No

28
Q

What does the “AWS Systems Manager Run Command” allow?

A

Lets you remotely configure EC2 instances without SSH or RDP

29
Q

What’s a fun fact about EN vs EFA

A

An Elastic Fabric Adapter (EFA) is simply an Elastic Network Adapter (ENA) with added capabilities. It provides all of the functionality of an ENA, with additional OS-bypass functionality. OS-bypass is an access model that allows HPC and machine learning applications to communicate directly with the network interface hardware to provide low-latency, reliable transport functionality.

The OS-bypass capabilities of EFAs are not supported on Windows instances. If you attach an EFA to a Windows instance, the instance functions as an Elastic Network Adapter, without the added EFA capabilities.

30
Q

What states are you BILLED for an EC2 Instance?

A
  • Billed
    • Running
    • Stopping (if hibernating)
  • Not Billed
    • Pending
    • Stopping (if truly stopping)
    • Shutting Down
    • Stopped
    • Terminated - unless its a reserve instance