View Source FSS.S3.Config (fss v0.1.0)
Represents the configuration needed for accessing an S3 resource.
Summary
Types
@type t() :: %FSS.S3.Config{ access_key_id: String.t(), bucket: String.t() | nil, endpoint: String.t(), region: String.t() | nil, secret_access_key: String.t(), token: String.t() | nil }
The configuration struct for S3.
The attributes are:
:access_key_id
- This attribute is required.:secret_access_key
- This attribute is required.:bucket
- A valid bucket name. This attribute is optional, but if is not provided, then the:endpoint
must include the bucket name either in the host, as a virtual host, or in the path. In other words: if the bucket is not given, then:endpoint
must be configured.This attribute is going to be set to
nil
if the endpoint was not provided, unless the bucket name contain dots in it.:region
- This attribute is optional. It's normally required when working with the official AWS S3 API.:endpoint
- If specified, then:region
is ignored. This attribute is required to be configured if you are using a service that is compatible with the AWS S3 API.In case only a "bucket URL" - without discrimination of the bucket name - is provided then the
:bucket
attribute can be nil just like the:region
.In case the endpoint is not provided, we compute a valid one for the AWS S3 API. This endpoint is going to follow the virtual-host style most of the time, with the only exception being when the bucket name has dots. In that case we build the AWS S3 endpoint without the bucket name in it.
:token
- This attribute is optional.