addressing_style - AWS SDKs and Tools Shared Configuration and Credentials

addressing_style

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

Details

Default value: auto

Valid values:

  • path – Treats the bucket name as if it's a path in the URI; for example, https://s3.amazonaws.com/bucketname. 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, https://bucketname.s3.amazonaws.com.

  • 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 X
s3 = addressing_style = path
credentials file -
Environment variable -
CLI parameter -

Compatibility with AWS SDKS and tools