Skip to content

A serverless plugin to easily share CloudFormation template and code's artifact produced by serverless.

Notifications You must be signed in to change notification settings

daaru00/serverless-plugin-share

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Serverless Share

npm

A serverless plugin to easily share CloudFormation template and code's artifact produced by serverless.

Usage

Installation

$ npm install serverless-plugin-share --save-dev

or using yarn

$ yarn add serverless-plugin-share

Configuration

plugins:
  - serverless-plugin-share

custom:
  share:
    bucket: my-public-bucket # (required) destination Bucket
    stack: my-deployed-service # (optional) stack name used in share link
    codeKey: my-service/deployed/code.zip # (optional) override code destination Key 
    templateKey: my-service/deployed/template.json # (optional) override template destination Key 
    parameters:
      MyRequiredParam: 'required' # (optional) parameter Default value will be removed
      MyOptionalParam: 'optional' # (optional) parameter Default value will be set to ''

Deploy

Once configured you are now able to deploy your service into an sharable version uploaded into destination Bucket using the following command:

serverless share

You can also override bucket and key configuration:

serverless share \
    --bucket my-service-template-bucket \
    --codeKey my-vendor/my-version/code.zip \
    --templateKey my-vendor/my-version/template.json \
    --stack my-deployed-service

Details

During download procedure the serverless artifact is downloaded and re-uploaded on the destination bucket. Produced CloudFormation template is downloaded, Parameters are parsed according to parameters settings and Lambda functions' code source is manipulated to point to destination bucket and key.

At the end of procedure will be printed a read-to-use share link, for example:

Share link: https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=example&templateURL=https://s3-eu-west-1.amazonaws.com/my-service-template-bucket/my-vendor/my-version/template.json

About

A serverless plugin to easily share CloudFormation template and code's artifact produced by serverless.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages