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.
It seems as though the
s3Options
object was intended for use in instantiatingprovider.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), runningsls offline start
results this error:Isolating the network results in this error:
...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 thebucketName
, so I added something to the README about that; and fixed the parameter name for the AWS credentials profile.