Giter VIP home page Giter VIP logo

serverless-lambda-announcer's Introduction

serverless-lambda-announcer ๐Ÿ’ฌ

A plugin for serverless framework that announces a deploy of a new function to a given url.
Build Status

Purpose

This plugin allows to specify a custom hook listening for lambda deploys.
On deploy the announcer will announce the lambda definition to the specified hook.
The hook should be a POST endpoint accepting json-encoded payload.

Installation

Run npm install serverless-lambda-announcer
Add it to the serverless.yml as:

plugins:
  ...
  - serverless-lambda-announcer
  ...

Usage

This plugin announces only full deployments: fired on sls deploy only โœŒ๏ธ

Configuration

In the serverless.yml specify a custom parameter for the announcer:

custom:
  # can be specified as an array attribute too: - announcer:
  announcer:
    # required:
    hook: <your POST webhook>
    # optional:
    contract:   
      /{function name}: <your contract> 

Hook:
The hook must be an accessible POST url accepting json input.

Contract:
The contract is an optional paramter. If specified must be mapped to function name. Can be specified in any form. It will be passed along in the body same way as was specified.

Announce Body

The body that is sent from the announcer is:

[
  {
    "endpoints": [
      {
        "method": <http method>,
        "path": <full https endpoint>
      }
    ],
    "name": "<service name> : <function name>",
    "identifier": <function name>,
    "events":[
      {<generated cloudformation event data>}
    ],
    "contract": <your specified contract (if exists)>
  }  
]

Kudos

Some methods are borrowed from the sourcecode of the serverless core plugins - super-duper-mega thanks

serverless-lambda-announcer's People

Contributors

dee-me-tree-or-love avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

serverless-lambda-announcer's Issues

Add tests for the package

This would benefit from having tests.
For unit testing consider regular node testing tools
For acceptance consider bats?

Add CI integration

What
CI would improve life drastically and would help publishing patches and new versions to npm

How
Still needs some researching how to organize that, but some options to look into: Travis CI and Jenkins

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.