AWS - Architectures Flashcards
How much memory can you allocate to a Lambda function?
128MB to 10,240MB
AWS uses this to calculate how much CPU to allocate
How much disk space do Lambda’s get and where do you access it?
Start out with 512MB of storage which you can scale up to 10,240MB. Accessible at /tmp
What 5 runtime environments are supported by Lambdas?
Python, Ruby, Go, C#, Node.js
How are permissions typically granted to Lambda functions?
Via IAM Execution Roles
How could you use Lambdas for serverless file processing?
Via S3 + S3 Events. For example the Upload Completed S3 event could trigger a Lambda function to apply watermarks to an image.
How could you use Lambda Functions in database triggers?
In DynamoDB, your DB triggers can invoke Lamdba functions assuming you enable DynamoDB Streams.
How could you use Lambda Functions to implement serverless CRON?
EventBridge or CWEvents can trigger Lamda functions on a scheduled interval.
What are 3 architectural methods for invoking Lambdas?
- Synchronous Invocation
- Asynchronous Invocation
- Event Source Mapping
What 4 destinations can asynchronous Lambda functions send successes/failures to?
- SQS
- SNS
- Other Lambdas
- EventBridge
How do asynchronous Lambdas handle failures? What design considerations should you use?
- Failures past the retry threshold get sent to a DLQ (dead-letter queue) - either an SQS queue or an SNS topic.
- Lambdas let you configure 0, 1, or 2 automatic retries
- Your functions have to be idempotent
What properties do Lambda Function Versions have?
- Each version contains both the code to run and the configurations for that function.
- Published versions of a Lambda Function are IMMUTABLE and have their own ARN.
- $Latest points at the latest version of a Lambda.
- Aliases, such as DEV, STAGE, or PROD can point at a specific version of a Lambda, and can be changed
When would you use the Lambda Provisioned Concurrency configuration?
When you need to keep X Execution Contexts warm and ready to use, to avoid latency associated with cold starts.