Skip to main content

bud.fs.s3.write

Write a file to the bucket. This function takes any of the properties that the S3 API's write function does.

Usage

Pass the file name as the first argument and a Buffer, string or ReadableStream as the second argument.

await bud.fs.s3.write(`my-file.txt`, `Hello World!`)

You can also supply the AWS input props directly. At minimum you will want to supply a Key (filename) and Body (contents to write).

await bud.fs.s3.write({
Key: 'my-file.txt',
Body: 'Hello World',
})