Serverless Flashcards
What is Serverless?
Focus on running code, and no need to manage the compute infrastructure
What are 3 benefits of Serverless?
- Pay as you go
- event based processing
- easy to use
What tools do you want to focus on in the exam?
Pick managed tools and favor serverless over unmanaged tools like EC2 and OS
What is AWS Lambda?
Service that lets you run code without needing to manage any underlying compute servers
What permissions to Lambda need?
It needs a role with whatever access needed to do work and basic lambda execution
What is the max memory and cpu for Lambda?
Max 10 GB, CPU scale proprotinately
How are you billed with Lambda?
Billed by lambda duration and resource configuration
What is the time max limit for Lambda?
15 minutes
What are good use cases for Lambda?
Microservices, short running code, need to trigger to start/stop instances or remove entries in SG (add features or enforce things)
What do you need to do if you want Lambda to make private api calls or talk to a db?
You need to have the lambda run in a VPC/subnet with SG, otherwise it can run outside that
What is the difference between containers and vm?
Containers run ontop of the guest os instead of having to duplicate the OS for each application/VM
What are containers?
Packaging of an application and all its depdencies for a standardized setup for different environments
What are containers seen as on the exam? When should you pick containers?
Seen as flexible
Pick when you need flexibility, moving around different environments, portable between on-prem and aws
What is ECS?
A managed AWS service that orchestrates at scale running thousands of containers, placing containers where appropriate
What is ECS vs EKS?
ECS is AWS proprieteary but is simple to use
EKS is open source Kubernetes, that can be hybrid on-prem but has more setup
When should you pick EKS on the exam?
If the exam mentions opensource, on-prem, Kubernetes
Why use Fargate over ECS?
Fargate takes out the work of managing the underlying servers that containers run on.
What kind of applications is ECS good for?
Long running or short running applications
What must be used with Fargate?
EKS or ECS
When should you use ECS EC2 vs Fargate?
EC2 for long running applications, when you want to use the EC2 cost savings, you are okay with container sharing same host
Fargate for short running tasks, billing based on resource and time, you need an isolated env
When should you use Lambda vs. Fargate?
Use Lambda for short running and simple functions, inconsistent workloads
Fargate is good for longer running applications, consistent workloads
What do you configure for Event Bridge?
You configure Rules that define a condition to trigger the rule and an action of where to send the event.