Skip to content

Deploy Python project to AWS Lambda #3

Deploy Python project to AWS Lambda

Deploy Python project to AWS Lambda #3

Workflow file for this run

name: Deploy Python project to AWS Lambda
on:
push:
paths:
- 'episode_poller/src/**'
workflow_dispatch:
env:
AWS_REGION: 'eu-north-1' # Change this to your desired AWS region
LAMBDA_FUNCTION_NAME: '198-land-episode-poller'
LAMBDA_FUNCTION_PATH: 'episode_poller'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Set up Just
uses: extractions/setup-just@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
- name: Deploy to AWS Lambda
run: |
cd ${{ env.LAMBDA_FUNCTION_PATH }}
just update-lambda