AWS Compute Flashcards

1
Q

List types of compute

A
  1. AWS App Runner
  2. Batch
  3. EC2
  4. EC2 Image Builder
  5. Elastic Beanstalk
  6. Lambda
  7. Lightsail
  8. AWS Outposts
  9. Serverless Application Repository
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are three types of compute?

A
  1. Virtual machines
  2. Container services
  3. Serverless
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Amazon EC2?

A

Amazon EC2 is a web service that provides secure, resizable compute capacity in the cloud.

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

When launching an EC2 instance, the first setting is what?

A

Amazon Machine Image (AMI)

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

What is an AMI?

A

Amazon Machine Image. Essentially the blue print for how you want your EC2 configured.

EC2 instances are live instantiations of what is defined in an AMI, much like a cake is a live instantiation of a cake recipe.

An AMI is reusable. You can create many EC2 instances from the same AMI configuration.

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

What is the relationship between AMI and EC2 instances?

A

EC2 instances are live instantiations of what is defined in an AMI.

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

What makes up an EC2 instance?

A

Virtual processors

Memory

Network

Storage

Graphics processing units

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

List 5 EC2 Instance Families (MAGCS)

A
  1. General purpose - Provides a balance of compute, memory, and networking resources, and can be used for a variety of workloads.
  2. Compute optimized - Ideal for compute-bound applications that benefit from high-performance processors.
  3. Accelerated computing - Use hardware accelerators or co-processors to perform functions such as floating-point number calculations, graphics processing, or data pattern matching more efficiently than is possible with conventional CPUs.
  4. Storage optimized - Designed for workloads that require high, sequential read and write access to large data sets on local storage. They are optimized to deliver tens of thousands of low-latency random I/O operations per second (IOPS) to applications that replicate their data across different instances.
  5. Memory optimized - Designed to deliver fast performance for workloads that process large data sets in memory.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Where does an EC2 instance live?

A

Placed in a network called the default Amazon Virtual Private Cloud (VPC)

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

EC2 Life Cycle. Explain at a high level?

A

When you launch an instance, you enter the ‘pending state’

Bill has not yet started

Your instance is ‘running’, ready to use, and billable

When running, you can take other actions such as ‘reboot’, ‘terminate’, ‘stop’, and ‘stop-hibernate’.

Stop instance (powering down)

Stop hibernate (locking laptop)

Terminate (getting rid of the instance forever)

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

ECWhat makes up EC2 pricing?

A

By the hour.

5 minutes and 30 seconds = 338 seconds

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

What are 3 main purchasing options for EC2?

A
  1. On demand
  2. Reserved
  3. Spot instances
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an on demand instance?

A

Pay as you go. Billing starts when the instance is running, and billing stops when the instance is in a stopped or terminated state.

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

What is a reserved instance?

A

You agree to a term. If stopped or terminated, you still pay because you agreed to a 1 - 3 year term.

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

What is a spot instance?

A

A price a customer is willing to pay for EC2 compute? If AWS determines the cost of EC2 compute is greater than what you are paying, your compute may be interrupted. You will get a 2 minute warning.

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

What is a ‘container’?

A

A container is a standardized unit that packages up your code and all of its dependencies. This package is designed to run reliably on any platform, because the container creates its own independent environment.

17
Q

What is ‘docker’?

A

Docker is a container runtime that simplifies the management of the entire operating system stack needed for container isolation, including networking and storage.

EC2 is a product that lets you spin up virtual machines.

Docker is a container runtime (one of many) that lets you run and manage containers on your machines.

ECS is a managed AWS service that lets you orchestrate and manage containers across multiple machines (sometimes the machine part is abstracted out, as in the case of “serverless” Fargate workloads). It’s a simpler (but far less powerful) and cheaper alternative to EKS.

The relationship between them is thus:

EC2 is your VMs

Docker is a piece of software you install on your VMs to run containers

ECS is a higher level service that uses EC2 instances and the Docker runtime under the hood plus a managed control plane to schedule and run containers on your instances

Another way to think about them is

ECS is the control plane. You tell it what containers you want run and when, and it finds a suitable place to schedule it and manages its lifecycle

EC2 is one of several capacity providers you can use to give compute capacity to ECS so it has a pool (a cluster) of machines to run its workloads on

Docker is the container runtime on each host that actually runs the containers.

18
Q

What is the difference between containers and virtual machines?

A

Containers share the same OS and kernel as the host they exist on whereas virtual machines contain their operating system.

Containers are much quicker to spin up

Virtual machines provide the full strength of an operating system.

19
Q

What is container orchestration?

A

When you use containers on AWS, you need processes for starting, stopping, restarting, and monitoring. All coordination is handled by orchestration. Containers run on EC2. Easy to manage 1, but many gets difficult.

20
Q

What is Amazon ECS?

A

Amazon Elastic Container Service ECS is an end to end container orchestration service that allows you to quickly spin up new containers and manage them across a cluster of EC2 instances.

21
Q

What is Amazon EKS?

A

A container orchestration tool for containers running on Kubernetes.

22
Q

What is AWS Fargate?

A

AWS Fartgate is a serverless compute platform for containers ECS and EKS

23
Q

EC2 vs. Fargate

A

EC2 and Fargate both run applications, but Fargate is a serverless model (by AWS), while EC2 is a managed infrastructure (by User).

24
Q

What is AWS Lambda?

A

AWS Lambda is a serverless compute service provided by Amazon Web Services that allows you to run code in response to events without having to provision or manage servers.

Event driven

Pay pay use (number of requests and duration it takes for code to execute)

Multi language support

Automatically respond to code execution requests at any scale, from a dozen events per day to hundreds of thousands per second.

Cons:

Cold Start

15 minute execution time

25
Q

Discuss EC2 and Fargate as it relates to Containers

A

EC2: Amazon Elastic Compute Cloud (EC2) is a web service that allows users to create and run virtual machines, or “instances”, in the Amazon Web Services (AWS) cloud. Deploy and manage your own cluster of Ec2 instances for running the containers

AWS Fargate: AWS Fargate is a serverless compute engine that allows users to run containers without managing servers or clusters of virtual machines.

26
Q

What is a NAT gateway?

A

You can use a NAT gateway so that instances in a private subnet can connect to services that are outside your VPC, but external services can’t initiate a connection with those instances.

In most cases, a NAT gateway would be placed in a public subnet so that a private subnet can access the public subnet’s NAT to get access to the internet.