Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
layers

GitHub Action

Lambda layer for python

0.1.9 Pre-release

Lambda layer for python

layers

Lambda layer for python

Deploy python code to AWS Lambda with dependencies in a separate layer

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Lambda layer for python

uses: LukasOrcik/action-lambda-layer@0.1.9

Learn more about this action in LukasOrcik/action-lambda-layer

Choose a version

Deploy lambda layer

A Github Action to deploy AWS Lambda functions written in Python with their dependencies in a layer.

Pre-requisites

The Action to have access to the code, you must use the actions/checkout@master.

Example workflow

name: deploy-lambda-layer
on:
  push:
    branches:
      - master
jobs:
  build:
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@master
    - name: Lambda layer for python
      uses: LukasOrcik/action-lambda-layer@0.1.0
      with:
        lambda_layer_arn: 'arn:aws:lambda:us-east-2:123456789012:layer:my-layer'
        architectures: 'x86_64'
        runtimes: 'python3.9 python3.8'
        package_path: 'common'
      env:
        AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        AWS_DEFAULT_REGION: 'us-east-2'