k1LoW / serverless-s3-sync

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

AWS provider.region not set #78

Closed redstone78 closed 3 years ago

redstone78 commented 3 years ago

in index.js on line 77 we are not setting the region, we need to update it like this below so that we can get the region:

   } else {
      //in this else condition, region is never set, so setting it and assigning to correct region issue
      region = provider.getRegion()
      awsCredentials = provider.getCredentials().credentials
    }
kking124 commented 3 years ago

it should probably be something like:

region = provider.getRegion() || provider.getCredentials().region;

this would allow the config to supersede any default region in the credentials. Thoughts?

redstone78 commented 3 years ago

it should probably be something like:

region = provider.getRegion() || provider.getCredentials().region;

this would allow the config to supersede any default region in the credentials. Thoughts?

Yeah that should work.

kking124 commented 3 years ago

see https://github.com/k1LoW/serverless-s3-sync/pull/80