A Simple serverless plugin that helps to empty the deployment bucket before removing the stack.
The following AWS permissions are required for this plugin to work:
s3:ListAllMyBucketss3:ListBuckets3:DeleteObjects3:DeleteBucket
Install the plugin via npm:
npm install --save-dev serverless-plugin-s3-removerAdd the plugin to your serverless.yml file:
plugins:
- serverless-plugin-s3-removerThe plugin will run automatically when you run serverless remove command.