k1LoW / serverless-s3-sync

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

S3 sync fails if provider.region is a variable #70

Closed spraot closed 3 years ago

spraot commented 4 years ago

This means we have to duplicate variables in a mono-repo because the references to shared variables break s3-sync. It appears that s3-sync does not attempt to resolve the variable at all.

williamsandonz commented 4 years ago

This is also affecting me, basically provider.region: ${env:foo} is not resolved and the sync fails. I've created PR here: Could we please get have this reviewed and merged?

clay-spfmlp commented 3 years ago

It looks like provider.getCredentials().region always returns undefined no matter what you have region set to. We are trying to deploy to aws gov cloud and it breaks the whole deployment. If we replace provider.getCredentials().region with provider.getRegion(), it works.