
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
gulp-awslambda
Advanced tools
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 = require('gulp');
var lambda = require('gulp-awslambda');
var zip = require('gulp-zip');
gulp.task('default', function() {
return gulp.src('index.js')
.pipe(zip('archive.zip'))
.pipe(lambda(lambda_params, opts))
.pipe(gulp.dest('.'));
});
For more information on lambda_params and opts see the API section.
See the example/ directory of this repo for a full working example.
lambda(lambda_params, opts)
lambda_paramsParameters 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 FunctionName and Role. All the other parameters have the following default values:
Handler = 'index.handler': This assumes a valid exports.handler in index.js at the root of your ZIPRuntime = 'nodejs4.3': Also accepts 'nodejs' and 'nodejs6.10'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.
optsOptions configuring the AWS environment to be used when uploading the function. The following options are supported:
profileIf you use a different credentials profile, you can specify its name with this option.
publishAllows 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.
region = 'us-east-1'Set your AWS region.
aliasRequires publish=true. Creates an alias for the version being published. If the alias already exists, it is updated to point to the version being published. Alternate versions may be specified. The following options are supported:
nameRequired string. The name of the alias.
descriptionOptional text to describe the function's version alias.
versionOptional version number to which to assign the alias. If not specified, the alias will be assigned to the version just published.
FAQs
A Gulp plugin for publishing your package to AWS Lambda
The npm package gulp-awslambda receives a total of 271 weekly downloads. As such, gulp-awslambda popularity was classified as not popular.
We found that gulp-awslambda demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.