sinofseven / serverless-s3-remover

this is plugin of serverless, before "sls remove", this empties the s3 bucket.
MIT License
39 stars 11 forks source link

Faild: XXX may not be empty #12

Closed pavelloz closed 6 years ago

pavelloz commented 6 years ago

Im trying to remove S3 buckets created by serverless but i get:

S3 Remover: Faild: us-east-1-input-dev may not be empty.
S3 Remover: Faild: us-east-1-output-dev may not be empty.

It looks like im not the only one: https://github.com/serverless/serverless/issues/3679#issuecomment-374036184

To be honest, when i go to bucket list in AWS console i cant see any of those buckets, so i dont know if the message (apart from typo in Failed ;) ) is misleading or serverless is creating those buckets in some other way thats impossible to see them (im looking here https://s3.console.aws.amazon.com/s3/home?region=us-east-1 )

image

sinofseven commented 6 years ago

@pavelloz

This message is displayed in the following two cases.

At this time, it was supposed that the object remained in the bucket, so we were putting the message "Faild: XXX may not be empty". Is it better to express that the deletion of the object failed?

pavelloz commented 6 years ago

Hey,

In my case im pretty sure its the second case if those two are the only options (S3 bucket doesn't exist at all), so IMO there should be 2 different messages for those two cases, because "may not be empty" suggests that it does exist and it tried to delete it, but didnt for some reason.

I dont know if there is a way to differentiate them using any check, so maybe just changing message to what you wrote above would be the best possible way of informing about it :)

ghost commented 6 years ago

Thank you, your suggestion. I will try out how to do something.

pavelloz commented 6 years ago

Thank you :)