# writeS3File | windmill-client
Documentation for windmill-client

# Function writeS3File

- writeS3File(s3object, fileContent, s3ResourcePath?): Promise< S3Object >

- Persist a file to the S3 bucket. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.

      const s3object = await writeS3File(s3Object, "Hello Windmill!")
      const fileContentAsUtf8Str = (await s3object.toArray()).toString('utf-8')
      console.log(fileContentAsUtf8Str)

  #### Parameters

  - s3object: undefined | S3Object
  - fileContent: string | Blob
  - s3ResourcePath: undefined | string = undefined

  #### Returns Promise< S3Object >

  - Defined in src/client.ts:595