Access and Orchestrate Amazon Simple Storage Service
This is a 'reticulated' wrapper for the 'Python' 'boto3' 'AWS' 'S3' client library https://boto3.readthedocs.io/en/latest/reference/services/s3.html. It requires 'Python' version 3.5+ and an 'AWS' account.
The following functions are implemented: (more to come)
create_bucket
: Create a new S3 bucketdelete_bucket
: Delete an S3 bucketdownload_file
: Download an S3 object to a fileupload_file
: Upload a file to an S3 objectfile_exists
: Test if a file exists in the specified bucketdevtools::install_github("hrbrmstr/roto.s3") # OR devtools::install_git("git://gitlab.com/hrbrmstr/roto.s3")
options(width=120)
library(roto.s3) library(tidyverse) # current verison packageVersion("roto.s3")
suppressMessages(suppressWarnings(unlink("/tmp/mtcars.csv", force=TRUE))) suppressMessages(suppressWarnings(unlink("/tmp/mtcars-01.csv", force=TRUE)))
write_csv(mtcars, "/tmp/mtcars.csv") upload_file( filename = "/tmp/mtcars.csv", bucket = "is.rud.test", key = "mtcars.csv", profile_name = "personal" ) file_exists( bucket = "is.rud.test", key = "mtcars.csv", profile_name = "personal" )
download_file( bucket = "is.rud.test", key = "mtcars.csv", filename = "/tmp/mtcars-again.csv", profile_name = "personal" ) read_csv("/tmp/mtcars-again.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.