Deploy Production Lambda Function #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | | |
pip install --target . 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 |