Code Monkey home page Code Monkey logo

-serverless-meta-syncpy's Introduction

Serverless Meta Sync Plugin

serverless gitter version downloads dependencies license

Secure syncing of Serverless project's meta data across teams (via S3 bucket).

This plugin adds a serverless meta sync command. When you run it with a stage or a region -s dev -r us-east-1, this plugin will first find or create an S3 bucket using the credentials you have set for that stage, then sync the variables files you have locally with the ones on the S3 bucket. For example, running serverless meta sync -s dev will sync your project's s-variables-dev.json with the s-variables-dev.json located on the S3 bucket.

When used via the CLI and conflicts are found, an interactive screen will let you easily select which option to use. When used without the CLI, the files located remotely automatically overwrite the files located locally, which is useful when used in the beginning of CI processes.

Demo

asciicast

Setup

  • Install via npm in the root of your Serverless Project:
npm install serverless-meta-sync --save
  • Add the plugin to the plugins array and to the custom object in your Serverless Project's s-project.json, like this:
"custom": {
  "meta": {
    "name": "YOUR_SYNC_S3_BUCKET_NAME",
    "region": "S3_BUCKET_REGION",

    // Optional, by default: "serverless/PROJECT_NAME/variables/"
    "keyPrefix": "S3_KEY_PREFIX"
  }
},
"plugins": [
    "serverless-meta-sync"
]
  • All done!

Usage

Run: serverless meta sync.

Options

  • -s --stage โ€” Stage. Optional if only one stage is defined in project. This will only sync the variables file of the specified stage (e.g., s-variables-dev.json).
  • -r --region โ€” Region. Optional. This will only sync the variables file for the specified region in the specified stage (e.g., s-variables-dev-useast1.json).

-serverless-meta-syncpy's People

Contributors

austencollins avatar minibikini avatar pmuens avatar wilsonmar avatar

Watchers

 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.