Serverless Flashcards
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