This action updates a Lambda function from a .zip file and (optionally) sends notifications about the update on Slack.
- Create a
.github/workflows/lambda-update.ymlfile in your GitHub repo. - Add the following code to the
lambda-update.ymlfile.
on: push
name: Lambda Pipeline
jobs:
lambda-pipeline:
name: run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Updating Lambda
uses: masoudkarimif/gh-action-lambda-update-slack@main
with:
s3_bucket: <S3_BUCKET_NAME>
s3_key: <S3_OBJECT>
code_path: <PATH_TO_ZIP_PACKAGE>
aws_region: <AWS_REGION>
env: <ENVIRONMENT_NAME>
function_name: <FUNCTION_NAME>
aws_access_key_id: <XXXXX>
aws_secret_access_key: <XXXXX>
slack_hook: <SLACK_HOOK_ENDPOINT>