Skip to content

Instantly share code, notes, and snippets.

@mwcz
Created January 15, 2021 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwcz/71273168ae1a163e4c15657e5f41e659 to your computer and use it in GitHub Desktop.
Save mwcz/71273168ae1a163e4c15657e5f41e659 to your computer and use it in GitHub Desktop.
const { S3Client, ListObjectsV2Command } = require("@aws-sdk/client-s3");
const client = new S3Client({
region: 'us-east-1',
credentials: {
accessKeyId: process.env['EYEBROWSE_S3_ACCESS_KEY'],
secretAccessKey: process.env['EYEBROWSE_S3_SECRET_ACCESS_KEY'],
},
clientSideMonitoring: true
});
const listObjCmd = new ListObjectsV2Command({
Bucket: 'eyebrowse-test-1'
});
async function main() {
try {
const data = await client.send(listObjCmd);
console.log(data);
} catch (error) {
console.error(error);
} finally {
console.log('done');
}
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment