Created
April 8, 2020 23:03
-
-
Save patrobinson/3933fa09ed96577ce3c0ef8ddfca85d5 to your computer and use it in GitHub Desktop.
Replicate JS SDK hanging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const aws = require ('aws-sdk'); | |
async function test() { | |
const s3 = new aws.S3({ | |
apiVersion: '2006-03-01', | |
signatureVersion: 'v4', | |
httpOptions: { | |
connectionTimeout: 1000, | |
timeout: 1000 | |
}, | |
region: 'ap-southeast-2', | |
maxRetries: 3 | |
}) | |
return s3.listBuckets().promise(); | |
} | |
test().then(function(f) { console.log(f) }).catch(function(e) { console.log(e.stack) }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment