From 764f50f00bd450351ccc8ff269d810fd33422267 Mon Sep 17 00:00:00 2001 From: timam Date: Thu, 16 May 2024 17:02:46 +0600 Subject: [PATCH] Update response structure in Lambda and AWS region in deploy workflow The response structure in Lambda's app.js has been updated by adding a comma to correctly format the returned JSON data. Also, changed the method of accessing AWS region in the deployment workflow to utilize GitHub secrets instead of environment variables for better security. --- .github/workflows/deploy.yaml | 2 +- demo/lambda/src/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 99bf151..4ef67cc 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -16,7 +16,7 @@ jobs: with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} + aws-region: ${{ secrets.AWS_REGION }} - name: Login to Amazon ECR id: login-ecr diff --git a/demo/lambda/src/app.js b/demo/lambda/src/app.js index 92fdd02..eea4812 100644 --- a/demo/lambda/src/app.js +++ b/demo/lambda/src/app.js @@ -1,6 +1,6 @@ exports.handler = async (event) => { const response = { - statusCode: 200 + statusCode: 200, body: JSON.stringify('Hello from Lambda!') }; return response;