Serverless Flashcards

1
Q

What does AWS X-Ray do?

A

it allows you to scan Lambda architecture and debug issues with AWS Lambda

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

Does AWS Lambda scale out automatically?

A

Yes

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

Does AWS Lambda scale up automatically?

A

No

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

Can an AWS Lambda function trigger another AWS Lambda Function?

A

No

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

What does SAM stand for?

A

Serverless Application Model

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

What is AWS SAM?

A

A superset of Cloudformation functionality that allows you to run serverless applications locally

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

What does ECS stand for?

A

Elastic Container Service

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

What is a container?

A

A container is a package with an application, libraries, runtime, and the tools required to run it

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

What are the benefits of using containers?

A
  • Containers provide isolation benefits of virtualization with less overhead and faster start times than VMs
  • Containers are portable, and offer a consistent environment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

At a high level, what does ECS do?

A
  • ECS is a managed container orchestration service
  • It creates clusters to manage fleets of container deployments
  • Schedules containers for optimized placement within a cluster
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the pricing structure of ECS?

A

ECS is free

(although the EC2/Fargate instances that you spin up in it have standard charges)

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

In the context of ECS, What is a cluster?

A

In ECS, A cluster is a logical connection of ECS resources

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

In the context of ECS, what is the difference between a task definition and a container definition?

A
  • A task definition defines your application (think Dockerfile but for ECS)
  • A container definition defines the individual containers a task uses (think CPU, malloc, port mappings)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Suppose you have two containers that always need to run together. How would you ensure this in ECS?

A

put their container definitions under the same task definition

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

In the context of ECS, what is a task?

A

A single running copy of any containers defined in a task definition

(One working copy of your application)

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

In the context of ECS, what is a service?

A

A service allows task definitions to scale by adding tasks.

Sets a min/max number of tasks that varies with autoscaling

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

In the context of ECS, what is a registry?

A

storage for container images

Used to download images to create containers

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

At a high level, what is Fargate?

A

Fargate is a serverless container engine

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

What is the pricing structure for Fargate?

A

You specify and pay for resources per application

20
Q

In what instances would you use EC2 instances instead of Fargate?

A
  • Strict compliance requirements
  • Your use case requires broader customization (since you can’t actually get in to the Fargate instance)
  • Your use case requires GPUs
21
Q

What does EKS stand for?

A

Elastic Kubernetes Service

22
Q

What does K8s stand for?

A

Kubernetes

23
Q

At a high level, what is Kubernetes?

A

Kubernetes is an open-source software that lets you deploy and manage containerized applications at scale

24
Q

In the context of EKS, what is a pod?

A

In EKS, containers are grouped into pods

It is roughly analagous to a task in ECS

25
What is the use case for EKS?
* You are **already using Kubernetes and want to migrate to AWS**
26
What does **ECR** stand for?
**E**lastic **C**ontainer **R**egistry
27
How does ECR ensure high availability?
It is **deployed across multiple AZs within a region**
28
What is the price structure of ECR?
With ECR, you pay for **storage** and **data transfer**
29
At a high level, what is ECR?
ECR is a **managed Docker container registry**
30
How does ECS benefit from ELB?
with ELB, you can **distribute traffic evenly across tasks in your service**
31
What is the difference between **EC2 Instance Roles** and **Task Roles**?
* An _EC2 Instance Role_ **applies a policy to _all tasks_ running in that EC2 instance** * A _Task Role_ **only applies to that task** So, Task Roles respect Least Priviledges better than EC2 instance Roles
32
When configruing SQS as event source for AWS Lambda function, what is the maximum batch size supported by AWS SQS `RecieveMessage` API call?
**10**
33
What Amazon CloudFront events can be used to trigger a Lambda Function?
* Viewer Request * Viewer Response * Origin Request * Origin Response (Source: https://github.cloud.capitalone.com/puggles/deposits-accounts-bankcard-pin/blob/develop/settings.xml#L9)
34
Suppose you change code and upload a new version of code to an AWS Lambda Function. What will happen to requests sent immediately after the code change?
For **a brief period (usually less than one minute**) requests **might be served by either the old or new version**
35
What poll-based services are supported by AWS Lambda?
* Kinesis * DynamoDB * SQS (Source: https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html?shortFooter=true%23streaming-event-source-mapping)
36
What are the limitations on what memory can be allocated to an AWS Lambda Function?
**128MB** to **3008MB**, in **increments of 64 MBs** (Source: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html)
37
Are Lambda environment variables automatically encrypted?
They are **encrypted when deployed**, and **decrypted when invoked** (so your code can use them)
38
What actions are required by Lambda Execution Role in order to write logs in CloudWatch?
* **CreateLogGroup** * **CreateLogStream** * **PutLogEvents**
39
When a lambda is synchronously invoked and errors, what is returned?
A **200** status code A **FunctionError** field in the response
40
What is the pricing model for AWS Lambda?
* **Requests** (per million) * **Total Duration and Hardware** (per GB-s)
41
In the context of ECS, what is a **task definition**?
A **JSON template that describes containers which form your application**
42
What are the key features offered by ECS?
* Containers and Images * Task Definitions * Tasks and Scheduling * Clusters * Container Agent
43
Can you add additional security capabailities to your ECS containers?
**Yes, you have root access to the OS of your container instances**
44
What should you do for monitoring and alerting with ECS?
Utilize **Cloud**_Trail_****
45
Can Lambda be used for monitoring?
**No**
46
How do ECS clusters get permissions to access your AWS resources?
They use **container instance roles** **in IAM**