Serverless Flashcards
(36 cards)
Benefits of Serverless
- 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
When to choose serverless on exam
favor serverless and managed services over traditional EC2
Lambda Settings - Runtime
your environment
Lambda Settings - Permissions
if your function makes an AWS API call, you need to attach a role
Lambda Settings - Networking
- optional
- you can define the VPC, subnet and security groups the function is a part of
Lambda Settings - Resources
you can define the amount of available RAM and CPU
Lambda Settings - Trigger
what event will cause your function to start?
Lambda Settings - Timeout*
max 15 minutes that a function can run
Lambda Settings - Limits
max 10 GB of RAM
Exam tips:
- Lambda is the answer if the question is “How do we add features to AWS to enforce things in AWS?”
Ex: How do we check new EC2 instances to see if they are configured with all the necessary tags or shut it down
Lambda
Ex: How do you automatically remove entries from a security group?
Lambda
Ex: How do you build a microservice that only runs occasionally?
Lambda
What can trigger Lambda:*
- S3
- CloudWatch Events
- API Gateway
- ALBs
Do you need a VPC for Lambda
no, it’s optional, but if you want to access a private database or API, you can put your function inside a VPC
What is a container?
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
Dockerfile
text document that contains all the commands or instructions that will be used to build an image
Image
an immutable file that contains the core libraries, dependencies and config files needed to run an application
Registry
stores docker images for distribution
- can be public and private
ECR
Elastic Container Registry
Container
a running copy of an image that has been created
Benefits of Containers
- create an immutable environment
- easily migrate from on-prem to AWS
- all environments are the same (i.e. Dev, and Prod are identical)
ECS
- 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
EKS
- 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