Skip to content

Instantly share code, notes, and snippets.

@apal21
Created January 25, 2019 19:24
Show Gist options
  • Save apal21/2078019631eaae926e6d72edcd45199d to your computer and use it in GitHub Desktop.
Save apal21/2078019631eaae926e6d72edcd45199d to your computer and use it in GitHub Desktop.
AWS S3 getObject using a callback
const s3 = new AWS.S3(accessparams);
s3.getObject(
{ Bucket: 'BUCKET-NAME', Key: 'path/to/your/file' },
(err, file) => {
if (err) throw err;
console.log(file.Body);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment