flypenguin
flypenguin

Reputation: 725

What is the detection mechanism for S3 "path access style fallback"?

I am trying to use Barman to back up a CNPG database cluster on S3.

The S3 service we need to use (on-premise, Huawei) requires "virtual host" access style, and Barman simply does not use it. Since Barman is using Boto3, and apparently the default access style of boto3 is "virtual host":

(Default) Attempts to use virtual, but falls back to path if necessary.

I am interested in the following:

It seems that there is (in contrast to other AWS behavior) no environment variable to force-control this, at least I could not find any in the boto3 docs.

I really don't understand why barman/boto3 apparently falls back to path-style, other services developed by us are using virtual-host-style quite happily.

Update – environment variable for access style (tl;dr - does not exist):

Looking at botocore's configprovider.py, it seems that there is no ENV variable available to specify the S3 access style explicitly:

DEFAULT_S3_CONFIG_VARS = {
    # [...]
    'addressing_style': (
        (
            's3',
            'addressing_style'
        ),                     # config file setting: s3.addressing_style
        None,                  # **HERE would be the ENV var name**
        None,                  # a default value
        None                   # a conversion function
    ),
    # [...]
}

(Interpretation of the addressing_style tuple taken from here). That was already suggested once (GitHub #3190), but declined.

Upvotes: 1

Views: 65

Answers (0)

Related Questions