Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github action to publish lambda layer #3

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/publish_lambda_layer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will install dependencies and create a build suitable
# to be used in an AWS Lambda Layer.
#
# Creates a build.zip and releases it into lambda layer.
#
# A new version of the layer will be created whenever we trigger this
# workflow.


name: Build Lambda Layer

# For now, keeping it manual dispatch.
on: [workflow_dispatch]

jobs:

deploy:
name: Upload Layer to AWS Lambda
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

# For more info: https://github.com/aws-actions/configure-aws-credentials
- 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: us-west-2

- name: Setup Python 3.8
pshanmukrao marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Zip it all up
run: zip --quiet -r flux-sdk.zip .

- name: Publish Lambda layer from zip
run: |
aws lambda publish-layer-version --layer-name flux-sdk --zip-file flux-sdk.zip --compatible-runtimes python3.8