我有以下代码段:
it('check dynamo1 and s3 ', async (done) => {
debugger;
let AWS = require('aws-sdk');
let dynamo = new AWS.DynamoDB()
let s3 = new AWS.S3()
console.log(`my config: ${JSON.stringify(s3.config)}`)
done()
})
这是结果
我的配置:{“ credentials”:null,“ credentialProvider”:{“ providers”:[null,null,null,null],“ resolveCallbacks”:[]},“ region”:“ us-west-1 “,” logger“:null,” apiVersions“:{},” apiVersion“:null,” endpoint“:” https://dynamodb.us-west-1.amazonaws.com “,” httpOptions“:{” timeout“:120000 },“ maxRedirects”:10,“ paramValidation”:true,“ sslEnabled”:true,“ s3ForcePathStyle”:false,“ s3BucketEndpoint”:false,“ s3DisableBodySigning”:true,“ computeChecksums”:true,“ convertResponseTypes”:true, “ correctClockSkew”:false,“ customUserAgent”:null,“ dynamoDbCrc32”:true,“ systemClockOffset”:0,“ signatureVersion”:null,“ signatureCache”:true,“ retryDelayOptions”:{},“ useAccelerateEndpoint”:false,“ clientSideMonitoring“:false,” endpointDiscoveryEnabled“:false,” endpointCacheSize“:1000,” hostPrefixEnabled“:true}
我的问题:端点错误,应该是https://s3.amazonaws.con而不是https://dynamodb.us-west-1.amazonaws.com(这显然会导致我的应用程序中断)