This file contains hidden or 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
function fail() { | |
throw new Error('Oops!'); | |
} | |
async function failAsync(ms = 1000) { | |
return new Promise((resolve, reject) => | |
setTimeout(() => { | |
reject(new Error('Async oops!')); | |
}, ms), | |
); |
This file contains hidden or 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 S3SDK = require("aws-sdk"); | |
const s3 = new S3SDK.S3({ | |
accessKeyId: "", | |
secretAccessKey: "", | |
endpoint: "nyc3.digitaloceanspaces.com", | |
}); | |
async function gettAllObjectsFromS3Bucket() { | |
let isTruncated = true; |