Serverless Flashcards
What does serverless mean?
What is the max
execution time for a lambda function?
How does scaling work for Lambda functions?
It means that you don’t provision or see servers.
15min
It is automated.
How does pricing work for lambda?
What do you get in the free tier of Lambda?
How much ram can you get per function?
How can you improve CPU and Network on in Lambda?
You pay per request and compute time.
1MM Requests and 400,000 GB of compute time. That means 400,000 seconds of compute time if the function has 1GB of ram. Or 40,000 seconds if the function has 10GB.
Up to 10gb.
By increasing the RAM.
What languages are supported on Lambda?
What type of image should be run on Lambda?
There are a lot of languages nativly supported on Lambda like Java, C#, Python etc. You can also run any language by using the custom runtime API
Images that implement the Lambda runtime API other standard docker images should be run on ECS/Fargate
How can you run a lambda function as a cron job?
Where are logs automatically stored?
You can configure an rule in CloudWatch Events bridge to trigger every hour and this would kick off the lambda function.
In cloudwatch.
What is the maximum memory allocation for a lambda function?
What is the max execution time for Lambda.
How much space is allocated for environment variables?
What is the max disk capacity for a lambda function?
How many concurrent executions do you get out of the box with Lambda? And how can this be increased?
10gb
900s (15 min)
4kb
512mb
1000, but you can request more
What is the max compressed deployment size for lambda
What is the max ucompressed deployment size for lambda?
What should you do if you need space for additional files?
50mb
250mb
Use the /tmp space
What is lambda at edge?
At what points can lambda at edge modify CloudFront requests/responses?
Whenever you need to integrate a lambda function with your cloudfront distribution.
It allows you to deploy lambda instances along side your CloudFront to modify reqeusts at the following points viewer request origin request origin response viewer response
What are some of the ways that Lambda@Edge can be used?
Website security and privacy Dynamic web application at edge SEO Intelligently rout across origins and data centers Bot Mitigation at the Ede Real time image transformation A/B testing User authentication and auth User prioritization User tracking an analytics
What is provisioned mode from Dynamo DB?
You can specify the number of reads/writes per second
You need to plan capacity before hand
Pay for provisioned read capacity units (RCU) and write capacity units (WCU)
Its possible to add auto-scaling mode from RCU and WCU
What is On-Demand Mode for DynamoDB?
More expensive than provisioned mode Read/Writes automatically scale up/down with your workloads No capacity planning needed Pay for what you use Great for unpredictable workloads
What is DAX?
What is the TTL for DAX?
Dynamo DB Accellerator is used for caching Dynamo DB DB. It sits on type of dynamo db tables to help return faster results (Microseconds)
5 min
What is DnyamoDB Stream?
What can you do with these steams?
What is the retention time for this stream?
It is an Orderd stream of item level modifications (create update delete) in a table
Send them to Kinesis Data Streams
Read by Kinesis Client Library
Read with AWS Lambda
24h
What are some use-cases for DynamoDB streams?
React to changes in real time (ex send a welcome email) Analytics Insert into derived tables Insert into ElasticSearch Implement Cross Region replication
What are DynamoDB Global tables?
What is the pre-requisite for Global tables?
Global tables will write to tables across regions. This is active-active replication. Applications can read and write to tables in any region.
You must enable DynamoDB streams
How can you keep the size of dynamo DB tables small or remove data after some time period.
How can you search on items other than the primary key in DynamoDB?
How does dynamo DB provide consistency when writing to multiple tables?
By using dynamo DB TTL
By using a secondary index.
This is provided via Transactions.