创建新实例后错误的S3端点

时间:2019-01-22 12:39:48

标签: javascript amazon-s3 aws-sdk

我有以下代码段:

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(这显然会导致我的应用程序中断)

0 个答案:

没有答案