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

Check deletion results before determining success/failure #17

Open jordan-brough opened 5 years ago

jordan-brough commented 5 years ago

We should look to see if any errors are returned here.

It's possible for errors to exist in these results. For example, if the AWS user has permission to list the buckets but does not have permission to delete the bucket items.

Example logs (after applying this patch):

Serverless: Failed: my-testing-bucket may not be empty. Serverless: [[{"Key":"foo","Code":"AccessDenied","Message":"Access Denied"},{"Key":"bar","Code":"AccessDenied","Message":"Access Denied"}]] S3 Remover: Failed: my-testing-bucket may not be empty.

coyoteecd commented 4 years ago

@sinofseven, can you merge these pending pull requests and publish a new version please? I tried to use this plugin today and ran into the same AccessDenied error that was reported as success.

coyoteecd commented 3 years ago

@jordan-brough since this project is no longer maintained, I published a reimplemented plugin that includes the error checking you and I asked here, see note in #22