AWS S3 storage provider.
Stores files in Amazon S3 buckets using the ExAWS library. Supports all S3-compatible services (like Backblaze B2, Cloudflare R2, Tigris).
Files under 5 MB are uploaded via put_object (single request).
Files at or above 5 MB use multipart upload via ExAws.S3.upload/4
with streaming and concurrent chunk uploads.
Summary
Functions
A bucket's endpoint, parsed: %{scheme:, host:, port:}; nil when none is
set (plain AWS); {:error, :invalid_endpoint} when one is set but cannot
be used. The one place a bucket's endpoint is read, so the host requests go
to and the host a public URL names cannot disagree. The parsing itself is
PhoenixKit.Modules.Storage.Endpoint.parse/1, shared with the Integrations
validator so a connection is checked against the host it will be used on.
Whether name is a bucket name an S3-protocol service accepts: 3 to 63
lowercase letters, digits, dots and hyphens, starting and ending with a letter
or digit, no .., and not shaped like an IP address. Nothing that could
change the host or path of a request.
Functions
@spec endpoint(map()) :: PhoenixKit.Modules.Storage.Endpoint.parsed() | nil | {:error, :invalid_endpoint}
A bucket's endpoint, parsed: %{scheme:, host:, port:}; nil when none is
set (plain AWS); {:error, :invalid_endpoint} when one is set but cannot
be used. The one place a bucket's endpoint is read, so the host requests go
to and the host a public URL names cannot disagree. The parsing itself is
PhoenixKit.Modules.Storage.Endpoint.parse/1, shared with the Integrations
validator so a connection is checked against the host it will be used on.
Whether name is a bucket name an S3-protocol service accepts: 3 to 63
lowercase letters, digits, dots and hyphens, starting and ending with a letter
or digit, no .., and not shaped like an IP address. Nothing that could
change the host or path of a request.