s3io_write | R Documentation |
Write a file to AWS S3
s3io_write( obj, bucket, key, writefun, ..., .localfile = fs::file_temp(), .rm_localfile = TRUE, .aws_config = NULL, .put_object_opts = NULL, .opts = .aws_config )
obj |
<anything> The object to write. |
bucket |
<chr(1)> AWS S3 bucket name. |
key |
<chr(1)> AWS S3 object key. |
writefun |
<function> A write function where the first argument is the object to write and the second argument is a filepath.
The function's signature should look like |
... |
Additional arguments passed on to |
.localfile |
<chr(1)> The local filepath for the initial write-to-disk. |
.rm_localfile |
<lgl(1)> Remove |
.opts |
<dict> Additional –opts for the AWS CLI 'aws s3api put-object' command.
A common option you may want to specify, e.g., is content-type: |
The returned value from writefun
.
## Not run: s3io_write(iris, "mybucket", "my/object/key.csv", readr::write_csv, col_names = TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.