Skip to content

Commit 17bb63c

Browse files
committed
(infra): Set reserved executions and batch size
Reserved executions is now 10 and the batch size is 5. When I come to do the analysis for this prototype, I expect I'll want to look at: 1. How cold starts vary across languages 2. How languages with an async pattern compare to those without 3. How the execution time varys per language In order to do that, I'll need lots of invocations which include a good number of cold starts. By setting a lower batch size and a reasonably high concurrency limit I can add more messages to the queue and force more cold starts
1 parent bdd7564 commit 17bb63c

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

infra/modules/lambda/lambda.tf

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
resource "aws_lambda_function" "lambda" {
2-
function_name = "lambda_benchmark_${var.language_name}_lambda"
3-
filename = var.source_file
4-
role = aws_iam_role.base_lambda_role.arn
5-
handler = var.handler
6-
source_code_hash = filebase64sha256(var.source_file)
7-
runtime = var.runtime
8-
architectures = ["arm64"]
9-
timeout = 5
10-
tags = var.default_tags
2+
function_name = "lambda_benchmark_${var.language_name}_lambda"
3+
filename = var.source_file
4+
role = aws_iam_role.base_lambda_role.arn
5+
handler = var.handler
6+
source_code_hash = filebase64sha256(var.source_file)
7+
runtime = var.runtime
8+
architectures = ["arm64"]
9+
timeout = 5
10+
tags = var.default_tags
11+
reserved_concurrent_executions = 20
1112

1213
environment {
1314
variables = {
@@ -24,4 +25,5 @@ resource "aws_lambda_function" "lambda" {
2425
resource "aws_lambda_event_source_mapping" "mapping" {
2526
event_source_arn = aws_sqs_queue.queue.arn
2627
function_name = aws_lambda_function.lambda.arn
28+
batch_size = 5
2729
}

0 commit comments

Comments
 (0)