Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug where S3 client would not get instantiated with offline options #93

Merged
merged 1 commit into from
Oct 26, 2021
Merged

fix bug where S3 client would not get instantiated with offline options #93

merged 1 commit into from
Oct 26, 2021

Conversation

rcambrj
Copy link
Contributor

@rcambrj rcambrj commented Oct 13, 2021

It seems as though the s3Options object was intended for use in instantiating provider.sdk.S3, but was never actually used for this...

This affected the usage of serverless-s3-sync in offline mode, because the endpoint would not be respected and the sync process would attempt to talk to AWS. When using credentials configured for S3RVER (serverless-s3-local), running sls offline start results this error:

InvalidAccessKeyId: The AWS Access Key Id you provided does not exist in our records.

Isolating the network results in this error:

UnknownEndpoint: Inaccessible host: `my-bucket-name.s3.eu-central-1.amazonaws.com' at port `undefined'. This service may not be available in the `eu-central-1' region.

...confirming my suspicion.

In addition, the bucketNameKey logic will not work correctly under these circumstances, because it attempts to do the same thing to find the bucketName, so I added something to the README about that; and fixed the parameter name for the AWS credentials profile.

@k1LoW
Copy link
Owner

k1LoW commented Oct 26, 2021

@rcambrj Thank you !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants