A Gulp plugin for publishing your package to AWS Lambda
$ npm install --save-dev gulp-awslambda
It is recommended that you store your AWS Credentials in
~/.aws/credentials as per the docs.
gulp-awslambda accepts a single ZIP file, uploads that to AWS Lambda, and passes it on down the stream. It works really well with gulp-zip:
var gulp = ;var lambda = ;var zip = ;gulp;
For more information on
opts see the API section.
example/ directory of this repo for a full working example.
Parameters describing the Lambda function. This can either be...
corresponding to the name of an existing Lambda function. In this case gulp-awslambda will only update the function's code.
that is mostly the same as you would pass to
updateFunctionConfiguration(). The only required parameters are
Role. All the other parameters have the following default values:
Handler = 'index.handler': This assumes a valid
index.jsat the root of your ZIP
Runtime = 'nodejs4.3': Also accepts
gulp-awslambda will perform an upsert, meaning the function will be created if it does not already exist, and updated (both code and configuration) otherwise.
For code, gulp-awslambda will default to passing the
ZipFile property. However, you may alternatively pass e.g.:
Code:S3Bucket: 'myBucket'S3Key: 'function.zip'...
to upload from S3.
Options configuring the AWS environment to be used when uploading the function. The following options are supported:
If you use a different credentials profile, you can specify its name with this option.
Allows you to publish a new version when passing in a string for
lambda_params. Otherwise, you may simply specify
Publish as a parameter. If both are provided, the value in
lambda_params will take precedence.
Set your AWS region.