k1LoW / serverless-s3-sync

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

Add `OnlyForEnv` parameter directive #68

Closed mk2 closed 3 years ago

mk2 commented 4 years ago

Purpose: To upload a file only in a specific environment.

How to use:

in serverless.yaml:

custom:
  s3Sync:
    - bucketName: my-bucket
      localDir: files
      params:
        - "prod.json":
            OnlyForEnv: prod
        - "stg.json":
            OnlyForEnv: stg
        - "dev.json":
            OnlyForEnv: dev

The prod.json will be uploaded only in the prod environment, other files too.

k1LoW commented 3 years ago

@mk2 Sorry for the late reply. Look good! Thank you!

k1LoW commented 3 years ago

Released as v1.15.0.

mk2 commented 3 years ago

Thanks!