A Buildkite plugin for deploying AWS Lambda function code.
steps:
- name: deploy
plugins:
- peakon/lambda-deploy#v1.1.1:
function_name: myfunction
zip_file: deploy-version.zip
path: path/to/deploy/code
s3_bucket: deploybucket
s3_key: deploy/key/name
region: ap-southeast-2
The name of the AWS Lambda function you wish to update
The name of the zip file. If the zip file exists we deploy the file directly to AWS Lambda (via aws lambda update-function-code --zip-file
).
If the file does not exist we use the path
to create the zip file. If s3_bucket
and s3_key
are declared we will first push the file to S3.
If the path
is specified with the zip_file
then the path
is added to the zip_file
. If no path is given then we default to the value
of $PWD
which is added to the zip_file
. If the path is given but the zip_file
is not present, then the we cd
into the path
and
create a zip
of the contents which is then uploaded.
The S3 bucket. The S3 bucket must already be created and have the correct permissions to copy an object to it.
The path to store the S3 key
The region to deploy lambda to. Defaults to us-east-1
MIT (see LICENSE)