Skip to content

Instantly share code, notes, and snippets.

View roneicostajr's full-sized avatar
🥓
Eat happy. Be bacon.

roneicostajr

🥓
Eat happy. Be bacon.
View GitHub Profile
@apal21
apal21 / S3 getObject async-await.js
Last active March 20, 2024 19:47
AWS S3 getObject using async/await
const s3 = new AWS.S3(accessparams);
(async () => {
try {
const file = await s3
.getObject({ Bucket: 'BUCKET-NAME', Key: 'path/to/your/file' })
.promise();
console.log(file.Body);
} catch (err) {
console.log(err);