It is not possible to use alternative s3 urls (path style) and s3-compatible backends (e.g. min.io) in conjunction with the production_host and staging_host option.
Status
Originally host was defined as a string property of binary. The required AWS settings were automatically detected and extracted from the string.
Pull request #533 defined production_host and staging_host as string properties of binary and the logic that governs which is used when. The required AWS settings were also automatically detected and extracted from the strings.
Pull request #576 added bucketregion and s3ForcePathStyle as string properties of the binary object. The trio of keys, along with host value, enables to explicitly set access to a bucket, bypassing automatic detection and extraction.
Problem
bucketregion and s3ForcePathStyle are set as properties of binary when in fact they are (together with the endpoint) properties of the host target. Since there can be multiple host targets (staging/production) but there can only be a single explicitly set bucket name, the alternate host option doesn't work in conjunction with the production_host and staging_host option.
Proposed Solution
Moving forward host will be defined as an object with optional properties.
Overview
It is not possible to use alternative s3 urls (path style) and s3-compatible backends (e.g. min.io) in conjunction with the
production_host
andstaging_host
option.Status
host
was defined as a string property ofbinary
. The required AWS settings were automatically detected and extracted from the string.production_host
andstaging_host
as string properties ofbinary
and the logic that governs which is used when. The required AWS settings were also automatically detected and extracted from the strings.bucket
region
ands3ForcePathStyle
as string properties of thebinary
object. The trio of keys, along withhost
value, enables to explicitly set access to a bucket, bypassing automatic detection and extraction.Problem
bucket
region
ands3ForcePathStyle
are set as properties ofbinary
when in fact they are (together with the endpoint) properties of the host target. Since there can be multiple host targets (staging/production) but there can only be a single explicitly set bucket name, the alternate host option doesn't work in conjunction with theproduction_host
andstaging_host
option.Proposed Solution
Moving forward host will be defined as an object with optional properties.
Example 1: (S3 Virtual Host URL)
Example 2: (Path Style alternative host)
Example 3: (Utilizing Staging/Production)
Note: the proposed object keys are the same as the ones passed to the AWS sdk.
Backwards compatibility
Existing string definitions and existing keys will be supported.
Example 1: (S3 Virtual Host URL)
Example 2: (Alternative S3 URL)
Example 3: (Utilizing Staging/Production for S3 Virtual Host URL)