From 8c2c65a149600415cf5587841a7514b349df44da Mon Sep 17 00:00:00 2001 From: Zach Wolfenbarger Date: Tue, 3 Oct 2023 19:17:12 -0500 Subject: [PATCH] Production lambda deploy --- .../workflows/deploy_lambda_production.yml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/deploy_lambda_production.yml diff --git a/.github/workflows/deploy_lambda_production.yml b/.github/workflows/deploy_lambda_production.yml new file mode 100644 index 0000000..051b798 --- /dev/null +++ b/.github/workflows/deploy_lambda_production.yml @@ -0,0 +1,37 @@ +name: Deploy Production Lambda Function + +on: + workflow_dispatch: + +jobs: + deploy_lambda: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./kinesis-to-http + name: Deploy production lambda + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.LAMBDA_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.LAMBDA_AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + role-session-name: lambda-deploy-production + + - name: Install dependencies + run: | + mkdir ./package && pip install --target ./package requests + + - name: Zip package + run: | + zip -r ./lambda.zip . + + - name: AWS Deploy + run: | + aws lambda update-function-code \ + --function-name eras-forwarder-production \ + --zip-file fileb://lambda.zip