Giter Club home page Giter Club logo

lambdoku's Introduction

Lambdoku

Heroku-like experience with AWS Lambdas.

Features

Connecting current directory with lambda (like heroku git:remote)

$ lambdoku init <ARN-of-your-lambda-function>

this allows you to omit the -a param for all commands below

Simplified environment variables management (heroku config)

$ lambdoku config:set ONE=1 TWO=2

$ lambdoku config
ONE='1'
TWO='2'

$ lambdoku config:get ONE
ONE='1'

Simplified releases management (heroku releases)

$ lambdoku releases
22 | Setting env variables AA | 2016-11-26T21:12:46.894+0000
21 | Unsetting env variables XY | 2016-11-26T21:10:04.302+0000
20 | Setting env variables BB,XY | 2016-11-26T20:57:57.340+0000
...

$ lambdoku rollback 18

$ lambdoku releases
23 | Rolling back to version 18 | 2016-11-26T21:35:45.952+0000
22 | Setting env variables AA | 2016-11-26T21:12:46.894+0000
21 | Unsetting env variables XY | 2016-11-26T21:10:04.302+0000
20 | Setting env variables BB,XY | 2016-11-26T20:57:57.340+0000
...

in the example โ˜๏ธ both code and configuration is rolled back from version 18.

Pipelines (heroku pipelines)

(actually the main reason why lambdoku was created)

$ lambdoku init lambdaDev

$ lambdoku pipeline:add lambdaStage

$ lambdoku pipeline:add lambdaProd -a lambdaStage

$ lambdoku pipeline
lambdaStage

$ lambdoku pipeline:promote

now lambdaDev and lambdaStage have the same codebase. lambdaStage can be promoted to lambdaProd with command lambdoku downstream:promote -a lambdaStage.

Installation

  1. Prerequisite: AWS Environment variables

    • Set required variables:
      • AWS_ACCESS_KEY_ID
      • AWS_SECRET_ACCESS_KEY
      • AWS_DEFAULT_REGION
  2. Prerequisite: Node and npm (ES6 support required)

    • On OS X with homebrew: brew update && brew install node
  3. Then, simply:

    npm install -g lambdoku

Internals (aka 'how it works?')

  • it's simply an abstraction layer over AWS Lambda API effectively invoking aws-sdk
  • each change applied to lambda is finished with lambda version publication
  • the rollback and promote operations retrieve code from AWS and uploads it in place of current one
  • pipelines use special env variable (please ๐Ÿ™ don't use it :)) DOWNSTREAM_LAMBDAS to the dowstreams

Known issues

Due to the nature of AWS Lambda API most of the operations can't be considered atomic, like:

  • the change in configuration has to first retrieve current configuration - which may be change in the meantime
  • the rollback can be infected with change done in configuration in the 'meantime'
  • the pipelines promote can be infected by changes done at the same time on downstream

lambdoku's People

Contributors

kubek2k avatar chids avatar samuela avatar

Watchers

Rafael Pereira avatar

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.