k1LoW / serverless-s3-sync

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

Fix: Unify getting aws / serverless credentials #96

Closed honzajerabek closed 2 years ago

honzajerabek commented 2 years ago

Hi This fixes problems when authed only using Serverless' SERVERLESS_ACCESS_KEY env variable, AWS credentials stored in Serverless dashboard. (not with locally stored aws credentials or aws-cli)

S3 sync was working this way only with bucketName and not with bucketNameKey, due to these differences in credentials. This MR only reuses the method originally from client() method again in resolveStackOutput. It doesn't change any logic (including the comments).

I believe this is also related/possible fix to https://github.com/k1LoW/serverless-s3-sync/issues/66

k1LoW commented 2 years ago

@honzajerabek Thank you !