View Source FSS.S3 (fss v0.1.0)
Specification for accessing AWS S3 resources.
Summary
Functions
Builds a Config.t()
reading from the system env.
Parses a URL in the format s3://bucket/resource-key
.
Functions
@spec config_from_system_env() :: FSS.S3.Config.t()
Builds a Config.t()
reading from the system env.
@spec parse(String.t(), Keyword.t()) :: {:ok, FSS.S3.Entry.t()} | {:error, Exception.t()}
Parses a URL in the format s3://bucket/resource-key
.
Options
:config
- It expects aConfig.t()
or aKeyword.t()
with the keys representing the attributes of theConfig.t()
. By default it isnil
, which means that we are going to try to fetch the credentials and configuration from the system's environment variables.The following env vars are read:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
orAWS_DEFAULT_REGION
AWS_SESSION_TOKEN
In case the endpoint is not provided, we compute a valid one for the AWS S3 API, That is going to follow the path style. The endpoint is not going to include the
:bucket
in it, being necessary to do that when using this FSS entry.See https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html for more details.