GithubHelp home page GithubHelp logo

anthony-waters / serverless-api-stage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leftclickben/serverless-api-stage

0.0 1.0 0.0 11 KB

AWS API Gateway stage plugin for serverless framework

JavaScript 100.00%

serverless-api-stage's Introduction

Serverless API Stage plugin

Build Status License: MIT

Plugin for the serverless framework that allows the use of stages with defined stage variables and logging configuration, when using the AWS provider.

This is a rewritten plugin with the same functionality provided by two existing plugins:

Namely:

  • In addition to the AWS::APIGateway::Deployment resource, an AWS::APIGateway::Stage resource is also created.
  • The stage is linked to the deployment, to replace the StageName property of the deployment.
  • The stage may have stage variables defined by custom.stageSettings.Variables in your serverless.yml.
  • The stage may have logging and other method properties defined by custom.stageSettings.MethodSettings in your serverless.yml.
  • An AWS::IAM::Role resource is created with the correct permissions to write Cloudwatch logs.
  • This IAM Role for logs is set in the AWS::ApiGateway::Account settings resource.

Installation

Install the plugin via npm.

Usage Example

#...
plugins:
  - serverless-api-stage
#...
custom:
  stageSettings:
    Variables:
      foo: bar
      baz: xyzzy
    MethodSettings:
      LoggingLevel: INFO
      # see below...
#...

The full list of MethodSettings available are defined in the AWS CloudFormation documentation.

Contributors

Please contribute by submitting a pull request, or raising an issue.

Code changes or additions should include corresponding unit test changes or additions. Tests can be run locally using npm test. This requires global installation of jshint and mocha (npm install -g jshint mocha).

serverless-api-stage's People

Contributors

leftclickben avatar

Watchers

Anthony Waters 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.