Created
March 6, 2022 11:33
-
-
Save SalvoCozzubo/a2628bd5de34b4dcf5d123f721667474 to your computer and use it in GitHub Desktop.
Upload a file in S3 in nodejs
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 putFile = async () => { | |
const params = { | |
Bucket: process.env.BUCKET, | |
Key: 'file.txt', | |
Body: 'hello world', | |
}; | |
return client.send(new PutObjectCommand(params)); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment