k1LoW / serverless-s3-sync

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

Files removed from S3 even with noSync: true #116

Closed ErikAGriffin closed 1 year ago

ErikAGriffin commented 1 year ago

Hi, in my serverless.yml file I've included the following:

plugins:
  - serverless-s3-sync
custom:
  s3Sync:
    buckets:
    - bucketName: my-bucket
      bucketPrefix: folder/
      localDir: config/folder
      deleteRemoved: false
      noSync: true # Prevent removal of objects with `sls remove`

However, when I run sls remove -s stage, the objects are still getting removed from the bucket.

ErikAGriffin commented 1 year ago

Ah, just by writing this out again I believe I found my issue: noSync is a property that must be under the s3Sync property, not under and individual bucket.