Serverless Flashcards

1
Q

Benefits of Serverless

A
  • ease of use
  • event based (doesn’t come online until someone makes a call)
  • pay as you go - only pay the amount of time your code is running
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When to choose serverless on exam

A

favor serverless and managed services over traditional EC2

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

Lambda Settings - Runtime

A

your environment

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

Lambda Settings - Permissions

A

if your function makes an AWS API call, you need to attach a role

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

Lambda Settings - Networking

A
  • optional

- you can define the VPC, subnet and security groups the function is a part of

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

Lambda Settings - Resources

A

you can define the amount of available RAM and CPU

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

Lambda Settings - Trigger

A

what event will cause your function to start?

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

Lambda Settings - Timeout*

A

max 15 minutes that a function can run

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

Lambda Settings - Limits

A

max 10 GB of RAM

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

Exam tips:

A
  • Lambda is the answer if the question is “How do we add features to AWS to enforce things in AWS?”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Ex: How do we check new EC2 instances to see if they are configured with all the necessary tags or shut it down

A

Lambda

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

Ex: How do you automatically remove entries from a security group?

A

Lambda

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

Ex: How do you build a microservice that only runs occasionally?

A

Lambda

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

What can trigger Lambda:*

A
  • S3
  • CloudWatch Events
  • API Gateway
  • ALBs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Do you need a VPC for Lambda

A

no, it’s optional, but if you want to access a private database or API, you can put your function inside a VPC

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

What is a container?

A

a standard unit of software that packages up code and dependencies, so that the application runs quickly and reliably from one computing environment to another

17
Q

Dockerfile

A

text document that contains all the commands or instructions that will be used to build an image

18
Q

Image

A

an immutable file that contains the core libraries, dependencies and config files needed to run an application

19
Q

Registry

A

stores docker images for distribution

- can be public and private

20
Q

ECR

A

Elastic Container Registry

21
Q

Container

A

a running copy of an image that has been created

22
Q

Benefits of Containers

A
  • create an immutable environment
  • easily migrate from on-prem to AWS
  • all environments are the same (i.e. Dev, and Prod are identical)
23
Q

ECS

A
  • Elastic Container Service
  • manages containers at scale
  • role integration to talk to other parts of AWS
  • easy to use
  • built inside AWS, only works with AWS
24
Q

EKS

A
  • Elastic Kubernetes Service
  • opensource
  • built by google
  • can be use on-prem and in AWS
  • heavy lift to manage, still has work to do to configure and integrate with AWS
  • multi-cloud
25
Q

What exceptions would cause you to choose EKS over ECS?

A
  • need something open source
  • need to run it on-prem
    otherwise choose ECS
26
Q

What exceptions would cause you to choose EKS over ECS?

A
  • need something open source
  • need to run it on-prem
    otherwise choose ECS
27
Q

Fargate

A

serverless compute engine for containers that works with both ECS and EKS

28
Q

When to choose EC2 over Fargate?

A
  • to use Reserved Instances
  • for long-running containers
  • multiple containers can share the same host
29
Q

When to choose Fargate over EC2?

A
  • when you don’t need operating system access
  • you pay based on the resources allocated and the time ran
  • excels at short-running tasks
  • isolated environments
  • containers that don’t need to run all the time
30
Q

When to use Fargate over Lambda?

A
  • when you have more consistent workloads

- allows docker use across the organization and a greater level of control by developers

31
Q

When to use Lambda over Fargate?

A
  • great for unpredictable or inconsistent workloads
  • perfect for applications that can be expressed as a single function
  • light-weight
  • easily integrated into
32
Q

Fargate exam tip

A

Walk thru the use case for when to use Lambda vs EC2 vs Fargate before you go into the exam.

33
Q

Event Bridge

A
  • formerly known as Cloud Watch Events
  • an event bus
  • allows you to pass events from a source to an endpoint
  • it’s the glue that holds your serverless application together
  • when something happens or kicks off, it alerts the next step of the process
  • any API call that happens can kick off Event Bridge and Lambda
34
Q

What is the fastest way to respond to things in your environment?

A

Cloud Watch Events / Event Bridge

35
Q

Any AWS API call can trigger an Event Bridge Rule

A

use this to build in your own features

36
Q

Which is faster, Event Bridge, or scraping thru CloudWatch logs?

A

Event Bridge