3 ms·
Why not just include the sqlite DB as part of your lambda deployment package?
by jedberg 6y ago
Why not just include the sqlite DB as part of your lambda deployment package?
- diroussel 6y agoAs long as you can fit it in your 1MB zip file, for viewer-request events. For origin-requests you get 50MB. See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html#limits-lambda-at-edge https://docs.aws.amazon.com/AmazonCloudFront/latest/Develope...
- deleted 6y ago[deleted]
- jedberg 6y agoYou only have five seconds to process the entire request. If your lambda has to make a request to download a sqlite database every time, and the process it, it probably needs to be small enough to fit into 1MB anyway.
- freemium413 6y agoAWS Lambdas can run up to 15 minutes actually
- shree_ch 6y agoLambda functions running @Edge have different limits compared to vanilla AWS Lambda. You get 30 seconds to respond if it's on a cache miss (Origin Request/Response), or 5 seconds if it's on a cache hit (Viewer Request/Response): https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-requirements-limits.html https://docs.aws.amazon.com/AmazonCloudFront/latest/Develope...
- cobookman 6y agoLambda (at least the non-@edge version) comes with 512MiB of /tmp directory storage And "The same Lambda execution environment may be reused by multiple Lambda invocations to optimize performance. The /tmp area is preserved for the lifetime of the execution environment and provides a transient cache for data between invocations. Each time a new execution environment is created, this area is deleted." https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-... https://aws.amazon.com/blogs/compute/choosing-between-aws-lambda-data-storage-options-in-web-apps/ https://aws.amazon.com/blogs/compute/choosing-between-aws-la...
- recuter 6y agoI'm playing around with just that. Regular Lambda (not edge) are just container images up to 10 GB in size. There's also the layers thing. A function can use up to five layers at a time. The total unzipped size of the function and all layers can't exceed the unzipped deployment package size limit of 250 MB. Can update separately from the container, almost as fast as a regular fs. And finally it has access to EFS which is faster than S3.