addressing_style - AWS SDKs and Tools


Specifies which addressing style to use. This controls whether the bucket name is in the hostname or is part of the URL.


Default value: auto

Valid values:

  • path – Treats the bucket name as if it's a path in the URI; for example, If you set the addressing style to path, you must ensure that the AWS Region you configured in the SDK or tool matches the Region of your bucket.

  • virtual – Includes the bucket name as part of the hostname; for example,

  • auto – The default value. The SDK or tool attempts to use the virtual style where it can, but will fall back to path style when required. For example, if your bucket name is not DNS compatible, the bucket name cannot be part of the hostname and must be in the path. With auto, the SDK or tool detects this condition and automatically switches to path style for you.

Ways to set this value

Location Supported Example
config file Yes
s3 = addressing_style = path
credentials file -
Environment variable -
AWS CLI parameter -

Compatibility with AWS SDKS and tools