k1LoW / serverless-s3-sync

A plugin to sync local directories and S3 prefixes for Serverless Framework :zap:
182 stars 68 forks source link

Take --nos3sync into account during serverless remove #81

Closed coyoteecd closed 3 years ago

coyoteecd commented 3 years ago

Apply --nos3sync flag when running serverless remove as well.

One use case is when I remove a stack with an S3 bucket sync-ed with serverless-s3-sync and the stack removal fails, CloudFormation leaves behind a partially-removed stack (with the S3 bucket already deleted). Trying to remove it again gives an error because serverless-s3-sync tries to clear the non-existing bucket.

In my case, I am already using serverless-s3-remover (because some buckets are sync-ed from other repositories). That plugin ignores all errors. So I want to disable bucket clearing on remove by serverless-s3-sync, since the other plugin already handles it.

k1LoW commented 3 years ago

Hi @coyoteecd! Thank you! Nice!!

k1LoW commented 3 years ago

Released as v1.17.0.