AWS EC2 Flashcards

1
Q

What does EC2 stand for?

A

Elastic Computer Cloud

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

EC2 provides _____ and _____ compute capacity in the cloud.

A
  1. Secure

2. Resizable

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

True or False: EC2 is a VM hosted on premises in your own data center.

A

False.

EC2 is like a VM, but is hosted in AWS’s datacenters.

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

EC2 instances are restricted in capacity and processing power.

A

No, you get the capacity & compute power your want when you need it.

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

What level of control do you have over your own EC2 instances?

A

Complete control

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

With EC2, you pay ____________.

A

You pay only for what you use.

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

With EC2, you can _____ and _____ your EC2 instances whenever you need.

A

Grow and Shrink

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

What are the 4 pricing options for EC2?

A
  1. On-Demand
  2. Reserved
  3. Spot
  4. Dedicated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the key value of the On-Demand Pricing Option in EC2?

A

Pay by the hour or the second, depending on the type of instance you run.

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

What is the key value of the Reserved Pricing Option in EC2?

A

Reserve capacity for 1 or 3 years. Up to 72% discount on the hourly charge.

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

Spot Pricing Option in EC2 value?

A

Purchase unused capacity at a discount of up to 90%. Prices fluctuate with supply & demand.

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

Dedicated Pricing Option in EC value?

A

A physical EC2 server dedicated for your use. Most expensive option.

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

What’s the most expensive pricing option available for EC2?

A

Dedicated

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

What’s the least expensive pricing option available for EC2?

A

Depends on work-load. If small, intermittent loads then On-Demand. If consistent, long-term loads, then Reserved.

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

When you attach or detach roles to running EC2 instances, do you need to stop or terminate the instances?

A

No. You can attach or detach roles to running EC2 instances without having to stop or terminate those instances.

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

What category of services does EC2 fall under?

A

Compute

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

SSH is what port?

A

22 (Linux)

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

Port 3389 is used by what application and OS?

A

Windows RDP (Remote Desktop Connection)

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

HTTP is for what and uses what port?

A

Web browsing and port 80.

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

What port and purpose does HTTPS serve?

A

Encrypted Web Browsing (SSL) and Port 443.

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

What is are Security Groups in regards to EC2?

A

Security groups are virtual firewalls for your EC2 instance. By default, everything is blocked.

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

In order to be able to communicate to your EC2 instances via SSH/RDP/HTTP, you will need to __________?

A

Open up the correct ports.

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

In order to let anyone/anything have access to your EC2 instance, you must designate this IP address:

A

To let everything in, you use

0.0.0.0/0

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

What is a bootstrap script?

A

A script that runs when the instance first runs.

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

When you add a bootstrap script, what impact does it have on booting up the EC2 instance? What does it allow you to do?

A
  1. Adds to the amount of time it takes to boot the instance.

2. Automate the installation of application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q
What does the following bootstrap script do?
---------------
#!/bin/bash
yum update -y
yum install httpd -y
service httpd start
cd /var/www/html
echo "<h1>Hello Cloud Gurus</h1>" > index.html
A
  1. Updates the operating system
  2. Installs web service httpd
  3. Starts the web service
  4. changes directory to main location for web service files.
  5. Creates index.html file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

When creating a new instance, how can you apply a bootstrap script?

A

When creating a new instance, you can either:

  1. Paste the bootstrap.sh text into “Advanced Details” under “Configure Instance Details”
  2. Attach the file (in the same location
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Changes to security groups take effect ___________.

A

Immediately.

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

You can have _______ EC2 instances within a security group.

A

Any number

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

You can have ________ security groups attached to EC2 instances.

A

Multiple

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

For an EC2 instance, what’s the default setting on allowing inbound traffic?

A

All inbound traffic is blocked by default.

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

For an EC2 instance, what’s the default setting on outbound traffic?

A

All outbound traffic is allowed.

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

A ________ script is a script that runs when the instance first runs.

A

bootstrap

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

What does a bootstrap script do?

A

Passes user data to the EC2 instance and can be used to install applications (like web servers and databases), as well as do updates and more.

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

What is EC2 metadata?

A

Data about your EC2 instance.

36
Q

What can EC2 metadata provide?

A

It can include information such as private IP address, public IP address, hostname, security groups, etc.

37
Q

What application do you use to retrieve metadata about your EC2 instance?

A

Use the curl command to query metadata about your EC2 instance.

38
Q

curl http://169.254.169.254/latest/meta-data/local-ipv4 > myIP.txt

A

It uses curl to connect to an API that returns your local-ipv4 values and writes your outbound IP address to a text file called myIP.txt

39
Q
What is this script useful for and final result?
------------
#!/bin/bash
yum update -y
yum install httpd -y
service httpd start
cd /var/www/html
echo "<h1>My IP is" > index.html 
curl http://169.254.169.254/latest/meta-data/public-ipv4 >> index.html
echo "</h1>" >> index.html
A
  1. Bootstrap script for EC2 instance.
  2. Installs a webservice and builds an index.html file.
  3. Uses curl to grab the user’s IP address
  4. Displays the IP address.
40
Q

In EC2, what is user data?

A

User data is simply bootstrap scripts.

41
Q

In EC2, what is metadata

A

Metadata is data about your EC2 instance.

42
Q

You can use ___________ (______) to access metadata.

A

You can use bootstrap scripts (user data) to access metadata.

43
Q

Define ENI.

A

ENI - Elastic Network Interface

. Can but used in networking w/ EC.
. Used for basic, day-to-day networking.

44
Q

You can attached ____ different types of virtual networking cards to your EC2 instances.

A

3 - three

ENI - Elastic Network Interface
EN - Enhanced Networking
EFA - Elastic Fabric Adapter

45
Q

Define EN.

A

EN - Enhanced Networking

Uses single root I/o virtualization (SR-IOV) to provide high performance.

46
Q

When you’re concerned about special licensing requirements in regards to an EC2 instance, think of this kind of pricing model.

A

Dedicated.

An Amazon EC2 Dedicated Host is a physical server with EC2 instance capacity fully dedicated to your use. Dedicated Hosts allow you to use your existing per-sock, per-core or per-VM software licenses, including Windows Server, Microsoft SQL Server and SUS Linux Enterprise Server.

47
Q

An Amazon EC2 _________ is a physical server with EC2 instance capacity fully dedicated to your use.

A

Dedicated Host

48
Q

__________ allow you to use your existing per-sock, per-core or per-VM software licenses, including Windows Server, Microsoft SQL Server and SUS Linux Enterprise Server.

A

Dedicated Hosts

49
Q

If you have an existing per-core license for Microsoft SQL Server that you’d need to use on EC2, you should use this pricing method.

A

Dedicated Host

50
Q

What are the three types of placement groups in EC2?

A
  1. Cluster
  2. Spread
  3. Partition
51
Q

What kind of placement group is a grouping of instances within a single Availability Zone? How are these recommended to be used? Are there any limitations on this grouping?

A
  1. Cluster Placement Group
  2. Recommended for applications that need low network latency, high network throughput, or both.
  3. Only certain instance types can be launched into a cluster placement group.
52
Q

What kind of placement group is a group of instances that are each placed on distinct underlying hardware? How are these recommended to be used? And what’s the study tip for scenario questions?

A
  1. Spread placement groups
  2. Spread placement groups are recommended for applications that have a small number of critical instances that should be kept separate from each other.
  3. Used for Individual Instances
53
Q

What kind of placement group is a grouping of instances has its own set of racks with their own network and power source?

A
  1. Partition Placement Groups

Each partition placement group has its own set of racks. Each rack has its own network and power source. No two partitions within a placement group share the same racks, allowing you to isolate the impact of hardware failure within your application.

EC2 divides each group into logical segments called partitions.

Study Tip: Used for Multiple Instances

54
Q

What are the 3 types of placement groups?

A
  1. Cluster Placement Groups - low network latency, high network throughput
  2. Spread Placement Groups - individual critical EC2 instances
  3. Partition Placement Groups - multiple EC2 instances; HDFS, HBase and Cassandra
55
Q

A ______ placement group can’t span multiple Availability Zones, whereas a ______ placement group and _______ placement group can.

A

A cluster placement group can’t span multiple Availability Zones, whereas a spread placement group and partition placement group can.

56
Q

Only _____ _____ __ ________ can be launched in a placement group (compute optimized, GPU, memory optimized, storage optimized).

A

Only certain types of instances can be launched in a placement group (compute optimized, GPU, memory optimized, storage optimized).

57
Q

AWS recommends ___________ instances within cluster placement groups.

A

homogenous

58
Q

You can move an existing instance into a placement group. Before you can move the instance, the instance ___________________. You can move the instance using AWS ____ or an AWS ____, but you can’t do it via the console yet.

A

must be in a stopped state

AWS CLI or AWS SDK

59
Q

These EC2 instances let you take advantage of unused EC2 capacity in the AWS Cloud.

A

Amazon EC2 Spot Instances let you take advantage of unused EC2 capacity in the AWS Cloud.

Spot Instances are available at up to a 90% discount compared to On-Demand prices.

60
Q

When do you use spot instances?

A

For stateless, fault-tolerant or flexible applications.

Applications such as big data, containerized workloads, CI/CD, high-performance computing (HPC), and other test and development workloads.

61
Q

To use Spot Instances, you must first decide on your ___________.

A

Maximum Spot price.

The instance will be provisioned as long as the Spot price is BELOW your maximum Spot price.

62
Q

You may also use a _____ ______ to stop your Spot Instances from being terminated even if the Spot price goes over your max Spot price. You can set this for between ______________ (currently).

A

Spot block. Lasts 1 to 6 hours.

63
Q

Spot instances are useful for these tasks:

A
  1. Big data and analytics
  2. Containerized workloads
  3. CI/CD and testing
  4. Image and media rendering
  5. High-Performance Computing (HPC)
64
Q

Spot instances are not good for:

A
  1. Persistent workloads
  2. Critical Jobs
  3. Databases
65
Q

A ____ ____ is a collection of Spot instances and (optionally) on-demand instances.

A

Spot fleet

66
Q

What does the Spot Fleet attempt to do? How is the request for Spot Instances fulfilled? What does the Spot Fleet attempt to maintain?

A
  • The Spot Fleet attempts to launch the number of Spot instances and On-Demand instances to meet the target capacity you specified in the Spot Fleet request.
  • The request for Spot Instances is fulfilled if there is available capacity and the maximum price you specified in the request exceeds the current Spot price.
  • The Spot Fleet also attempts to maintain its target capacity fleet if your Spot Instances are interrupted.
67
Q

Spot Fleets will try and match the __________ with your price restraints.

A

Target capacity

68
Q

What are 3 important points about launch pools?

A
  1. Setup different launch pools. Define things like EC2 instance type, operating system, and Availability Zone.
  2. You can have multiple pools, and the fleet will choose the best way to implement depending on the strategy you define.
  3. Spot fleets will stop launching instances once you reach your price threshold or capacity desire.
69
Q

Name the strategies for using Spot Fleets. Which is the most popular? What’s the default strategy?

A
  1. capacityOptimized
  2. diversified
  3. lowestPrice
  4. InstancePoolsToUseCount

Most popular = lowestPrice
Default = lowestPrice

70
Q

Define capacityOptimized strategy for EC2 Spot Fleets.

A

The spot instances come from the pool with optimal capacity for the number of instances launching.

71
Q

Define “diversified” strategy for EC2 Spot Fleets.

A

The Spot Instances are distributed across all pools.

72
Q

Define “lowestPrice” strategy for EC2 Spot Fleets.

A

The Spot Instances come from the pool with the lowest price. This is the default strategy.

73
Q

Define “InstancePoolsToUseCount” strategy for EC2 Spot Fleets.

A

The Spot Instances are distributed across the number of Spot instance pools you specify. This parameter is only valid when used in combination with lowestPrice.

74
Q

Spot Instances save up to ____% of the cost of On-Demand instances.

A

90%

75
Q

True or False: Spot Instances are useful for any type of computing where you don’t need persistent storage.

A

True

76
Q

What do you use to keep spot instances from terminating?

A

Spot Block

77
Q

A ____ _____ is a collection of Spot Instances and (optionally) On-Demand Instances.

A

Spot Fleet

78
Q

Can you merge EC2 placement groups?

A

No. You cannot merge placement groups.

79
Q

True or False: EC2 Hibernation is available for On-Demand instances, but not for Reserved instances.

A

False.

EC2 Hibernation is available for On-Demand instances AND for Reserved instances.

80
Q

EC2 Hibernation instance can’t be hibernated for more than _______ days.

A

EC2 Hibernation instance can’t be hibernated for more than 60 days.

81
Q

What operating systems allow EC2 hibernation?

A

Windows, Amazon Linux 2 AMI, and Ubuntu.

82
Q

What instance families allow EC2 Hibernation?

A

C3, C4, C5, M3, M4, M5, R3, R4, and R3 instance families allow EC2 hibernation.

83
Q

For EC2 Hibernation, what’s the upper value for the amount of instance RAM allowed?

A

For EC2 Hibernation, instance RAM must be less than 150 GB.

84
Q

Why is a hibernated EC2 instance faster to boot up?

A

With EC2 Hibernation, it is much faster to boot up because you do not need to reload the operating system.

85
Q

EC2 ________ preserves the in-memory RAM on persistent storage (EBS).

A

EC2 hibernation preserves the in-memory RAM on persistent storage (EBS).