board_s3 {pins}R Documentation

Use an S3 bucket as a board

Description

Pin data to an S3 bucket, such as on Amazon's S3 service or MinIO, using the paws.storage package.

Usage

board_s3(
  bucket,
  prefix = NULL,
  versioned = TRUE,
  access_key = NULL,
  secret_access_key = NULL,
  session_token = NULL,
  credential_expiration = NULL,
  profile = NULL,
  region = NULL,
  endpoint = NULL,
  cache = NULL
)

Arguments

bucket

Bucket name. You can only write to an existing bucket.

prefix

Prefix within this bucket that this board will occupy. You can use this to maintain multiple independent pin boards within a single S3 bucket. Will typically end with / to take advantage of S3's directory-like handling.

versioned

Should this board be registered with support for versions?

access_key, secret_access_key, session_token, credential_expiration

Manually control authentication. See documentation below for details.

profile

Role to use from AWS shared credentials/config file.

region

AWS region. If not specified, will be read from AWS_REGION, or AWS config file.

endpoint

Endpoint to use; usually generated automatically for AWS from region. For MinIO, use the full URL (including scheme like ⁠https://⁠) of your MinIO endpoint.

cache

Cache path. Every board requires a local cache to avoid downloading files multiple times. The default stores in a standard cache location for your operating system, but you can override if needed.

Authentication

board_s3() is powered by the paws package which provides a wide range of authentication options, as documented at https://github.com/paws-r/paws/blob/main/docs/credentials.md. In brief, there are four main options that are tried in order:

See the paws documentation for more unusual options including getting credentials from a command line process, picking a role when running inside an EC2 instance, using a role from another profile, and using multifactor authentication.

Details

Examples

## Not run: 
board <- board_s3("pins-test-hadley", region = "us-east-2")
board %>% pin_write(mtcars)
board %>% pin_read("mtcars")

# A prefix allows you to have multiple independent boards in the same pin.
board_sales <- board_s3("company-pins", prefix = "sales/")
board_marketing <- board_s3("company-pins", prefix = "marketing/")
# You can make the hierarchy arbitrarily deep.

# Pass arguments like `Tagging` through the dots of `pin_write`:
board %>% pin_write(mtcars, Tagging = "key1=value1&key2=value2")


## End(Not run)

[Package pins version 1.3.0 Index]