k1LoW / serverless-s3-sync

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

Sync is just one-way? #117

Open ErikAGriffin opened 1 year ago

ErikAGriffin commented 1 year ago

Perhaps I'm not understanding this library correctly:

Is syncing from an S3 bucket to the local repository not supported by this library? Or have I misconfigured something?

Here is what my configuration looks like:

plugins:
  - serverless-s3-sync
custom:
  s3Sync:
    noSync: false
    buckets:
    - bucketName: my-s3-bucket
      bucketPrefix: config/
      localDir: config/secrets
      deleteRemoved: false

Running sls s3sync returns the following:

Running "serverless" from node_modules
(node:15707) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use `node --trace-warnings ...` to show where the warning was created)
✔ Synced files to S3 buckets
✔ Synced bucket metadata
✔ Updated bucket tags

But nothing is updated in my local folder. I would like to have the contents of the S3 buckets synced to the serverless package before each deploy, is what I'm trying to achieve.

oismaelash commented 1 month ago

Run sls s3 sync after sls deploy for guarantee all resources(bucket) has all created