0.6.5 • Published 2 years ago

@serverless-aws/serverless-s3-remover v0.6.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

serverless-s3-remover

plugin for serverless to make buckets empty before remove

Fork

origin: https://github.com/sinofseven/serverless-s3-remover @sinofseven

fix serverless.variables.populateObject error: https://github.com/ssignal/serverless-s3-remover @ssignal

fix deprecation warning: https://github.com/sinofseven/serverless-s3-remover/pull/23 @sinofseven

all credit goes to the original author and contributors

Usage

Run next command.

$ npm install @serverless-aws/serverless-s3-remover

Add to your serverless.yml

plugins:
  - "@serverless-aws/serverless-s3-remover"

custom:
  remover:
     buckets:
       - my-bucket-1
       - my-bucket-2

You can specify any number of buckets that you want.

Now you can make all buckets empty by running:

$ sls s3remove

When removing

When removing serverless stack, this plugin automatically make buckets empty before removing stack.

$ sls remove

Using Prompt

You can use prompt before deleting bucket.

custom:
  remover:
    prompt: true # default value is `false`
    buckets:
      - remover-bucket-a
      - remover-bucket-b

terminal.png

Populating the configuration object before using it

custom:
  boolean:
    true: true
    false: false
  remover:
    prompt: ${self:custom.boolean.${opt:s3-remover-prompt, 'true'}}

I can use the command line argument --s3-remover-prompt false to disable the prompt feature.

0.6.5

2 years ago

0.6.4

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago