Elastic Compute Cloud (EC2) Flashcards

1
Q

What is an EC2 instance?

A

A virtual server hosted in an AWS data center, that is managed by you.

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

What are the EC2 pricing options?

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
3
Q

Explain EC2 Reserved pricing option.

A

It is reserved capacity for 1 to 3 years, with up to a 72% discount on the hourly charge.

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

Explain the EC2 Spot Instance pricing option.

A

You purchase unused capacity at a discount up to 90% and prices fluctuate based on supply and demand.

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

What are good use cases for the EC2 On-Demand pricing option?

A

Applications with short-term, spiky, or unpredictable workloads that cannot be interrupted.

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

What are good use cases for the EC2 Reserved pricing option?

A

When you have predictable usage with specific capacity requirements and where you can make upfront payments. You can save up to 72% off the standard EC2 On-Demand option.

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

What are Convertible Reserved Instances (RI) in EC2?

A

You have the option to change to a different RI type of equal or greater value with up to 54% off the On-Demand price.

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

What are the three types of EC2 Reserved Instance types?

A
  1. Standard Reserved
  2. Convertible Reserved
  3. Scheduled Reserved
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are Scheduled Reserved Instances (RI) in EC2?

A

You may launch them within the time window you define of a predictable recurring schedule.

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

Is a Reserved Instance cross-region?

A

No, it is regional-specific.

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

When should you use spot instances in EC2?

A

For applications that have flexible start and end times, or applications that are only feasible as really low compute prices, or applications that need an urgent amount of additional computing capacity.

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

When should you use dedicated hosts in EC2?

A
  1. When you have regulatory compliance requirements that do not support multi-tenant virtualization
  2. Great for licensing that doesn’t support multi-tenant or cloud deployments (e.g. Microsoft, Oracle)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are best practices for user access using the AWS CLI?

A
  1. Always give your users the minimum amount of access required to do their job
  2. Create groups and assign users to groups.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a AWS secret access key?

A

Effectively the password for using the AWS CLI, where you will only get to see it once. If you lose it, you’ll need to delete it and recreate a new one.

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

What operating systems are supported by the AWS CLI?

A
  1. Windows
  2. Mac
  3. Unix
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an IAM role?

A

An identity you can create in IAM that has specific permissions, however is intended to be assumable by anyone who needs it.

When you assume a role, it provides you with temporary security credentials for your role session.

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

Who or what can assume a role?

A
  1. People
  2. AWS architecture
  3. System-level accounts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Are roles account-specific?

A

No, they can allow the ability to interact with resources in other AWS accounts.

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

What is the preferred option from a security perspective in IAM, users, groups or roles?

A

Roles (to avoid hard-coding credentials)

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

If you change a policy document within a role, must you create a new role session to gain that new privilege?

A

No, it takes effect immediately.

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

If you attach a role to a running EC2 instance, must you restart the instance to gain that new privilege?

A

No, it takes effect immediately without requiring a restart.

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

What are security groups in EC2?

A

They are virtual firewalls for your EC2 instance.

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

By default, what ports are open on an EC2 instance?

A

By default, everything is blocked. You must create security groups to make ports accessible.

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

What is the IP address range to allow all access to an EC2 instance?

A

0.0.0.0/0

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

What is a bootstrap script in EC2?

A

A script that is run when the instance first runs, which allows you to automate the installation of applications.

It is referred to as user data.

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

If you change a security group’s permissions in EC2, must you restart the EC2 instance for it to take effect?

A

No, it takes effect immediately.

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

Is there a limit to the number of EC2 instances allowed in a security group?

A

No, there is no limit.

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

How many security groups can be attached to a single EC2 instance?

A

Multiple security groups are allowed.

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

What are the default inbound and outbound permissions for traffic in EC2?

A

All inbound traffic is blocked, and all outbound traffic is allowed.

30
Q

What is EC2 metadata?

A

Data about your EC2 instance, such as private/public IP addresses, what security groups it is in, etc.

31
Q

What is the difference between user data and metadata in EC2?

A

User data is simply bootstrap scripts and metadata is data about your EC2 instance. You can use bootstrap scripts (user data) to access your EC2 metadata.

32
Q

What are the three different networking adapters that can be attached to your EC2 instances?

A
  1. ENI (Elastic Network Interface) for basic day-to-day networking
  2. EN (Enhanced Networking) for single root I/O virtualization (SR-IOV) to provide high performance
  3. EFA (Elastic Fabric Adapter) which accelerates high performance computing (HPC) and machine learning applications
33
Q

What options does an ENI networking card in EC2 allow?

A
  1. Private IPv4 addresses
  2. Public IPv4 address
  3. Many IPv6 addresses
  4. MAC address
  5. 1 or more security groups
34
Q

When would you use and ENI networking adapter in EC2?

A
  1. Create a management network
  2. Use network and security appliances in your VPC
  3. Create dual-homed instances with workloads/roles on distinct subnets (allows private network addresses that are separate)
  4. Create a low-budget, high-availability solution

By default, when you create an EC2 instance, an ENI will be attached.

35
Q

When would you use Enhanced Networking adapter in EC2?

A
  1. For high-performance networking between 10 Gbps and100 Gbps
  2. It provides higher I/O performance and lower CPU utilization (single root I/O virtualization SR-IOV)
  3. It provides higher bandwidth, higher packet per second (PPS) performance, and consistently lower inter-instance latencies
36
Q

What are the two ways Enhanced Networking can be enabled in EC2?

A
  1. Elastic Network Adapter (ENA) which supports network speeds up to 100 Gbps for supported instance types
  2. Intel 82599 Virtual Function (VF) Interface which supports network speeds up to 10 Gbps for supported instance types (typically used on older instances)
37
Q

In a scenario where you are asked to recommend using an ENA Adapter or an Intel 82599 Virtual Function Interface, which would you recommend?

A

Always ENA adapter (its faster and more modern)

38
Q

What is an EFA in EC2?

A

It is an Elastic Fabric Adapter which is a network device you can attach to your EC2 instance to accelerate High Performance Computing (HPC) and machine learning applications.

It provides lower, more consistent latency and higher throughput than the TCP transport traditionally used in cloud-based HPC applications.

39
Q

In a scenario where you are asked about high-performance computing and what network adapter should you use, what would you recommend?

A

Elastic Network Adapter (ENA)

40
Q

What is OS-bypass feature in Elastic Network Adapters in EC2?

A

OS-Bypass enables HPC and machine learning applications to bypass the operating system kernel and communicate directly with the EFA device, but it is only supported on Linux, not Windows.

41
Q

In a scenario where you are asked about OS-bypass and how you can enhance your high-performance computing (HPC) and machine learning applications, what would you recommend?

A

OS-bypass with Elastic Fabric Adapter (ENA)

42
Q

In a scenario where you are asked about OS-bypass and how you can enhance your high-performance computing (HPC) and machine learning applications, what would network adapter recommend?

A

OS-bypass with Elastic Fabric Adapter (ENA)

43
Q

What are the three types of EC2 placement groups?

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

What is a clustered placement group in EC2?

A

Grouping instances in EC2 in a single AZ, for low network latency, high network throughput, or both.

45
Q

Can all EC2 instance types be launched in placement groups?

A

No, only certain types can (compute optimized, GPU and memory optimized, storage optimized)

46
Q

What are spread placement groups in EC2?

A

Grouping instances that are each placed on distinct underlying hardware.

47
Q

When would you recommend spread placement groups in EC2?

A

When you have a small number of critical instances that should be kept separate from each other, like primary and secondary databases.

48
Q

What are partition placement groups in EC2?

A

EC2 divides each group into logical partitions and each partition has its own set of racks and each rack has its own network and power sources.

49
Q

When would you recommend partition placement groups in EC2?

A

When you have multiple EC2 instances (e.g. HDFS, Cassandra, HBase) and they ned to be on their own racks and dedicated network infrastructure to isolate hardware failure within your application.

50
Q

What EC2 placement group can span multiple AZs?

A

Spread placement groups

51
Q

What EC2 placement group cannot span multiple AZs?

A

Cluster placement groups

52
Q

Can heterogeneous instances be placed into a cluster placement group in EC2?

A

AWS recommends only homogeneous instance in cluster placement groups.

53
Q

Can you merge EC2 placement groups?

A

No, you cannot.

54
Q

How can you move an existing instance into a placement group?

A

Before you move the instance, it must be in the stopped state. You can only use the AWS CLI and AWS SDK (but not console).

55
Q

In a scenario where you have a requirement about special licensing requirements or compliance requirements avoiding multi-tenancy hosts, what type of EC2 instance would you recommend?

A

Dedicated instance

56
Q

What do you need to choose when configuring a EC2 spot instance request?

A
  1. The maximum spot price (you will be provisioned a spot instance as long as the spot price is below this price) and the spot prices varies depending on AZs, capacity and regions.
  2. Desired number of instances
  3. Launch specification (what AMI)
  4. Request type (one time or persistent), and if persistent when is valid from and until
57
Q

How much warning are you given if your EC2 spot price is exceeded?

A

You have 2 minutes to choose whether to stop or terminate your instance.

58
Q

What is a spot block in EC2?

A

You may use this to stop your EC2 spot instances from being terminated for between 1 to 6 hours even if the spot price goes above your maximum.

59
Q

When are spot instances in EC2 NOT recommended?

A
  1. Persistent workloads (like websites)
  2. Critical jobs
  3. Databases
60
Q

How do you terminate instances under a persistent spot request?

A
  1. Cancel the spot request
  2. Terminate your instances that are running
61
Q

What is a spot fleet in EC2?

A

A collection of spot instances and (optionally) on-demand instances that attempt to match your target capacity with your price restraints.

It is broken into launch pools (which define the EC2 instance type, operating system, and AZ).

You have multiple pools that the fleet will choose the best way to meet the strategy you define.

62
Q

What are the four different strategies for spot fleets in EC2?

A
  1. Capacity Optimized
  2. Diversified
  3. Lowest Price (default option)
  4. Instance Pools to Use Count (only allowed in conjunction with Lowest Price)
63
Q

How much can spot instances save off the price of on-demand instances?

A

Up to 90% off

64
Q

Why would you use VMWare on AWS in EC2?

A
  1. If you need hybrid cloud strategy and you would like to leverage AWS services
  2. Migrating your existing cloud environment to AWS and you want to use VMWare built-in tools
  3. VMWare is famous for it’s Disaster Recovery technology, so can be used in a hybrid cloud environment for inexpensive DR
65
Q

How is vCenter deployed on AWS Cloud using VMWare?

A
  1. It runs on dedicated hardware hosted by AWS using a single AWS account
  2. Each host is capable of running multiple VMWare instances (up to the hundreds)
  3. Clusters (VCenter clusters) can start with two hosts (minimum number for availability) up to 16 hosts per cluster
66
Q

What is AWS Outposts?

A

Brings the AWS data center directly to you, on-premises, where you can run many AWS services in your data center.

It allows you to have 1U and 2U servers all the way up to 42U racks and multiple-rack deployments.

67
Q

What are the benefits of AWS Outposts?

A
  1. Hybrid cloud
  2. Fully managed infrastructure
  3. Brings consistency (AWS management console into your data center)
68
Q

What are the two AWS Outposts family members?

A
  1. Outposts Rack (a whole rack of servers starting with 42U rack and scales up to 96U, only meant for data center)
  2. Outposts Servers (in 1U or 2U form factor, for small spaces, such as retail stores, branch offices, healthcare provider locations, etc.) and it provides only compute and networking services
69
Q

In a scenario where you are asked how you can extend AWS to your on-premises data center, what service would you recommend?

A

AWS Outposts

70
Q

In what scenario would you use AWS Outposts Rack family member?

A

When you have a data center and large deployment requirements.

71
Q

In what scenario would you use AWS Outposts Servers family member?

A

In smaller spaces such as retail stores, branch offices, etc. where you have smaller deployment requirements.