Lambda Flashcards
Does lambda have an out of the box caching feature?
No. API gateway will provide this functionality in parallel with lambda.
You are uploading your lambda bundle to production. This contains your function code and all required dependencies. How big can the zip file be, and what is the maximum allowable size for your code and dependencies when uncompressed?
50MB Compressed, 250MB uncompressed.
What is the maximum concurrency for a lambda function - i.e. how many will be able to run at the same time?
1000
You have a lambda function which need to write data out during execution. What is the maximum amount you can write?
512MB
Your lambda function is interacting with a database. Its highly likely that the URL for this database will change at some stage. What can you do to accommodate this without re-writing your function?
Use environment variables to pass the updated URL to your function
What is the maximum timeout for a lambda function?
15 Minutes
Assuming we have lambda@edge deployed on cloudfront, can we change requests and responses between the origin and the viewer (i.e. the user)?
Yes. Lambda@edge can change a request before it is sent to the origin, after its been sent by the origin, after its been sent to the viewer and before it is relieved by the viewer.
We have a globally distributed application which we want to implement some intelligent filtering on the inbound requests BEFORE they hit the application stack. How could we do this?
Lambda@Edge allows lambda functions to be distributed by CloudFront. This can be used for request filtering as well as bot detection.
How is a lambda function called?
Through a trigger action you define when setting up your function such as an update or insert on a DynamoDB stream.
What are step functions and what is the maximum execution time for a step function?
Step functions are a visual way to orchestrate lambda functions. AWS’s preferred platform over SWF for most workflow functions. Maximum execution time is 1 year.
What are the minimum and maximum memory limits for lambda? What are the increments?
128MB to 3GB in 64mb increments
What do you use to enforce permissions on your lambda functions?
IAM Roles
Where do lambda logs get logged to? What permissions are needed?
Cloudwatch. The lambda function will need permissions to write to C/W