@valiton/serverless-s3-deploy

0.7.3 • Public • Published

Serverless S3 Deploy Plugin

This Plugin allows you to do 2 things

  1. When you package your service it uploads them t an S3 bucket.
  2. When you want to deploy it pull your prepackaged service from S3 and deploys it.

This can be useful if you want to separate the build and deployment step in your CI setup.

How to use

npm i -D @valiton/serverless-s3-deploy

Use node version 8 or higher. The only dependency of this plugin is the aws-sdk.

Add the plugin to your serverless.yml file in the plugins section and add a custom configuration(required).

plugins:
  - '@valiton/serverless-s3-deploy' # <--- add the plugin

...

custom:
  deploy-s3:
    # S3-bucket to put your packaged services (e.g. serverless-package-artifacts)
    bucket: your-bucket
    # path in S3 (key prefix) to store your packaged services
    # for example '${self:service}/${opt:tag}'
    path: 'path/to/folder'

The plugin exposes 2 commands, package-s3, deploy-s3 which are described below.

API

Build and store on S3

serverless package-s3 --tag tagOrBranch --package some-folder

Fetch from S3 and deploy

serverless deploy-s3 --tag tagOrBranch --package some-folder

Readme

Keywords

none

Package Sidebar

Install

npm i @valiton/serverless-s3-deploy

Weekly Downloads

4

Version

0.7.3

License

ISC

Unpacked Size

7.39 kB

Total Files

5

Last publish

Collaborators

  • valiton