question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stack removal fails because of non-empty S3 bucket

See original GitHub issue

This is a Bug Report

Description

Ran sls remove --stage prod.

For bug reports:

  • What went wrong? The stack failed to delete.

  • What did you expect should have happened? The stack should have been deleted.

  • What was the config / env variables you used?

  • What stacktrace or error message did you experience?

$ sls remove --stage prod
Serverless: Getting all objects in S3 bucket...
Serverless: Removing objects in S3 bucket...
Serverless: Removing Stack...
Serverless: Checking Stack removal progress...
...........................................Serverless: Deployment failed!

  Serverless Error ---------------------------------------

     An error occurred while provisioning your stack: PackageStorage
     - The bucket you tried to delete is not empty.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues

  Your Environment Information -----------------------------
     OS:                 darwin
     Node Version:       6.7.0
     Serverless Version: 1.6.1

Additional Data

  • NPM CLI version you are using: 3.10.3
  • Serverless version you’re using: 1.6.1
  • Node version you’re using: 6.7.0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jonsharrattcommented, Feb 9, 2017

Just a heads up I have started this, needs a bit of tidy up and realised don’t have tests for the .serverless_plugins 🙈: https://github.com/craftship/yith/blob/remove-storage-plugin/.serverless_plugins/remove-storage/index.js

0reactions
jonsharrattcommented, Feb 8, 2017

Having said that I think it should allow deleteBucket regardless of contents. Will check it out later 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't delete a Non-empty S3 bucket and Log group on ...
When I delete a cloudformation stack, it doesn't delete the non empty s3 bucket with it and non-empty log group with it.
Read more >
Deleting a bucket - Amazon Simple Storage Service
Make sure the bucket is empty – You can only delete buckets that don't have any objects in them. Make sure the bucket...
Read more >
How to Delete an S3 bucket on CDK destroy
To automatically delete an s3 bucket when the stack is deleted we have to first empty its contents and set its Removal Policy...
Read more >
How to Easily Delete an S3 Bucket with Millions of Files in it
These buckets, for better or for worse, had versioning enabled, and each contained hundreds of thousands — if not millions — objects. AWS...
Read more >
How to Delete S3 Bucket Contents in CloudFormation
The CloudFormation service won't delete an S3 bucket that contains objects. This means that if your stack wrote to a bucket and you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found