From 7f31a6e432dbb933d06b46669dfb3ac213fc9016 Mon Sep 17 00:00:00 2001 From: martincostello Date: Wed, 22 Nov 2023 16:07:36 +0000 Subject: [PATCH] Reduce Lambda memory Try running the Lambda with only 128MB of memory. --- .github/workflows/build.yml | 2 +- .github/workflows/deploy.yml | 2 +- src/LondonTravel.Skill/aws-lambda-tools-defaults.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 61f2640a..c023cd58 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ env: LAMBDA_DESCRIPTION: 'Deploy build ${{ github.run_number }} to AWS Lambda via GitHub Actions' LAMBDA_FUNCTION: 'alexa-london-travel' LAMBDA_HANDLER: 'LondonTravel.Skill::MartinCostello.LondonTravel.Skill.AlexaFunctionHandler::HandleAsync' - LAMBDA_MEMORY: 256 + LAMBDA_MEMORY: 128 LAMBDA_ROLE: ${{ vars.AWS_LAMBDA_ROLE }} LAMBDA_RUNTIME: 'provided.al2023' LAMBDA_TIMEOUT: 10 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fdf8aadd..e778d021 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -231,7 +231,7 @@ jobs: LAMBDA_ARCHITECTURES: 'arm64' LAMBDA_DESCRIPTION: ${{ needs.setup.outputs.function-description }} LAMBDA_HANDLER: 'LondonTravel.Skill::MartinCostello.LondonTravel.Skill.AlexaFunctionHandler::HandleAsync' - LAMBDA_MEMORY: 256 + LAMBDA_MEMORY: 128 LAMBDA_ROLE: ${{ vars.AWS_LAMBDA_ROLE }} LAMBDA_RUNTIME: 'provided.al2023' LAMBDA_TIMEOUT: 10 diff --git a/src/LondonTravel.Skill/aws-lambda-tools-defaults.json b/src/LondonTravel.Skill/aws-lambda-tools-defaults.json index 4149db1d..2c49f49f 100644 --- a/src/LondonTravel.Skill/aws-lambda-tools-defaults.json +++ b/src/LondonTravel.Skill/aws-lambda-tools-defaults.json @@ -4,7 +4,7 @@ "configuration": "Release", "framework": "net8.0", "function-runtime": "provided.al2023", - "function-memory-size": 256, + "function-memory-size": 128, "function-timeout": 10, "function-handler": "LondonTravel.Skill::MartinCostello.LondonTravel.Skill.AlexaFunctionHandler::HandleAsync" }