Elastic Compute Cloud (EC2) Flashcards

1
Q

What is an On-Demand instance?

A

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

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

What is a Spot instance?

A

Purchased unused capacity at a discount of up to 90%. Prices fluctuate with supply and demand. Great for applications with flexible start and end times.

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

What is a Reserved instance?

A

Reserve capacity for 1 or 3 years. Up to 72% discount on the hourly charge. Great if you have known or fixed requirements.

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

What is a Dedicated instance?

A

A physical EC2 server dedicated for your use. Great if you have server-bound licences to reuse or compliance requirements.

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

How can you give access to someone without access key ID and secret access key?

A

use roles.

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

How do you define permissions for a role?

A

via policies.

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

Can you update a policy already attached to a role?

A

Yes. it will take immediate effect.

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

Can you attach a role to a running EC2 instance?

A

Yes, you can attach/detach roles to running instances without having to stop or terminate them.

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

When do changes to security groups take effect?

A

Immediately.

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

How many instances can you have in a security group?

A

Any number.

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

Can you have multiple security groups attached to an EC2 instance?

A

Yes.

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

What is a security group?

A

A virtual firewall for your EC2 instance. It controls what traffic can reach your EC2 instance. You add rules to allows SSH or HTTP for example. By default everything is blocked.

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

What is a Bootstrap Script?

A

A script that runs when the EC2 instance boots. It has root permissions.

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

What are the default inbound/outbound traffic rules for security groups

A
  • All inbound traffic is blocked by default.
  • All outbound traffic is allowed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is User Data and Metadata?

A
  • User data is simply bootstrap scripts.
  • Metadata is data about your EC2 instances.
  • You can use bootstrap scripts (user data) to access metadata.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the 3 virtual networking cards that can be added to an EC2 instance?

A

1. Elastic Network Interface (ENI)
General purpose, day-to-day networking.

2. Enhanced Networking (EN)
When you need reliable, high
throughput. 10-100 Gbps.

3. Elastic Fabric Adapter (EFA)
High performance computing, machine learning, OS-bypass.

17
Q

What are the 3 types of Placement Groups?

A

Cluster
Grouping of instances within a single AZ.
Recommended for apps that need low network latency, high network throughput or both.
Only certain types of instances can be launched.

Spread
A group of instances that are each placed on distinct underlying hardware.
Recommended for apps that have a small number of critical instances that should be kept separate from each other.

Partition
Each partition placement group has its own set of racks. Each rack has its own network and power source. No two partitions share the same racks.
Multiple EC2 instances; HBase, HDFS, Cassandra etc.

Note: Spread and Partition placement groups can span multiple AZ’s.

Note: Can’t merge placement groups

Note: Can move existing instance into a placement group but must be stopped first. Using CLI or SDK, not console yet.

18
Q

What are the 3 interruption behaviours for Spot instances?

A

Hibernate, Stop and Terminate

19
Q

What are the use cases for Spot instances?

A
  • Containers (EC2, ECS, EKS)
  • Big Data and ML
  • HPC Workloads
  • Build CI/CD Pipelines
20
Q

What is a Spot Block?

A

To stop your Spot instances from being terminated even if the spot price goes above you max spot price.

You can set spot blocks between 1 to 6 hours currently.

21
Q

What are spot instances not good for?

A
  • Persistent workloads
  • Critical jobs
  • Databases
22
Q

How do you terminate a persistent spot request?

A

Cancel the spot request first then terminate the instance.

23
Q

What is a Spot Fleet?

A

A collection of Spot instances and (optionally) On-Demand instances.

24
Q

What is AWS Outposts?

A

Outposts brings the AWS data centre to directly to you, on-premise.

Allows you to have AWS services in your data centre.

1U-42U sizes

Fully managed

25
Q

What are the use cases for Outposts racks and servers?

A

Racks - for large deployments e.g. data centers

Servers - small space deployments e.g. retail stores.

26
Q

Which types of instances can be launched in a placement group?

A
  • Compute optimised
  • Memory optimised
  • Storage optimised
  • GPU
27
Q
A