Skip to content

Render directly to AWS s3? #439

Closed Answered by wlandau
nerutenbeck asked this question in Help
Apr 28, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Interesting use case. I can see how the ability to send rendered reports to a Se would be appealing.

The "aws_file" format can only accept a single file, and it sends that file to a bucket at _targets/objects/target_name (no file extension). By contrast, tar_render() and tar_render_raw() return multiple files, including the source Rmd, which I gather you don't want whisked away to the cloud. So in your pipeline, I recommend including a aws_file target that copies the HTML file from the previous step and uploads the copy. Sketch:

tar_target_raw(
  data_upload,
  copy_html_to_tmp(data_source_report),
  format = "aws_file"
}

copy_html_to_tmp <- function(path) {
  tmp <- tempfile()
  html <-

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@nerutenbeck
Comment options

@wlandau
Comment options

@nerutenbeck
Comment options

@wlandau
Comment options

Answer selected by nerutenbeck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants