Skip to content

A setup for uploading and invoking lambda functions via the AWS CLI using Gulp 4

License

Notifications You must be signed in to change notification settings

sarapple/lambda-deploy-invoke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lambda Update and Invoke Gulp

This is a configurable setup for uploading updated lambda functions and invoking them via the AWS CLI and gulp.

Dependencies

  • AWS CLI
  • npm dependencies (gulp4, node-zip, nconf, bluebird)
npm install

For this to work, you must run gulp using gulp 4+.

Configuration

  • Setup your AWS keys in the AWS CLI per the AWS CLI Docs

  • Crate a config [env].json file like (dev.json). Then set the NODE_ENV environment variable to the same name as the file when running gulp.

  • The file example.json is added as an example for your configs if you had an example environment.

  • Add your lambda function in the lambda folder. Then add the function name, function file name, region, filename, txt file of your lambad invocation request, and json target file for the response in your [env].json file.

{
  "lambda" : {
    "function_file": "example.js",
    "request_file": "resources/request.txt",
    "response_file": "resources/response.json",
    "function" : "example",
    "region": "us-east-1"
  }
}

Run Gulp

export NODE_ENV=dev && node ./node_modules/gulp/bin/gulp.js

About

A setup for uploading and invoking lambda functions via the AWS CLI using Gulp 4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published