RemotePersistentTerm.Fetcher.S3 (RemotePersistentTerm v0.12.0)

View Source

A Fetcher implementation for AWS S3.

Summary

Functions

Initialize an S3 Fetcher.

Types

bucket()

@type bucket() :: String.t()

failover_bucket()

@type failover_bucket() :: [bucket: bucket(), region: region()]

region()

@type region() :: String.t()

t()

@type t() :: %RemotePersistentTerm.Fetcher.S3{
  bucket: bucket(),
  failover_buckets: [failover_bucket()] | nil,
  key: String.t(),
  region: region()
}

Functions

init(opts)

Initialize an S3 Fetcher.

Requires AWS credentials to be provided via env vars. The following vars must be set to the appropriate values:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_DEFAULT_REGION

Options:

  • :bucket (String.t/0) - Required. The s3 bucket in which the remote term is stored.

  • :key (String.t/0) - Required. The key within the s3 bucket which refers to the remote term.

  • :region (String.t/0) - Required. The AWS region of the s3 bucket.

  • :failover_buckets (list of keyword/0) - A list of failover_buckets to use as failover if the primary bucket fails.

        The directory structure in failover buckets must match the primary bucket.