AWS Cloud Developer: Serveless Introduction Flashcards
Faas
FaaS : Function as a service: write code in individual functions and deploy them to a platform to be executed
Split application into small functions
Event driven
Pay per invocation
Rest is handled by a cloud provider
Serverless Components
FaaS : Function as a service: write code in individual functions and deploy them to a platform to be executed
Datastores: Storage of data
Messaging: Send messages from one application to another
Services: Services that provide functionalities where we don’t need to manage servers; i.e. authentication, ML, video processing
popular use cases for FaaS
mobile/web backends Real-time streaming files processing services glue -receiving events from services -interact with other services accordingly
lambda function
a single function connected to an event source running in AWS Lambda.
What parameters can we directly configure for an AWS Lambda function?
Amount of RAM
Function timeout
AWS Lambda limitations
At most 3GB of memory per execution
Functions can run no more that 15 minutes
Can only write files to /tmp folder
Limited number of concurrent executions(1000 by default)
Event size up to 6 MB
The downside of using lambda functions
Lamda function are volitile meaning, they only linger for 15 minutes after use. Even during continues use, environments are rotated every 4 hours. This means that lambda environments cannot maintain state or persistant connections.
State needs to be stored with other services such as databases
How many concurrent executions can a lambda function run?
1000
3 common lambda invocation types
Request/response
Asynchronous invocation
Using AWS CLI
When is an event sent to a Lambda function added to a Dead Letter Queue?
if an asynchronous invocation fails after three unsuccessful attempts