diff --git a/docs/pages/reference/backends.mdx b/docs/pages/reference/backends.mdx index 5ab4353ffb2e2..de81cb7721475 100644 --- a/docs/pages/reference/backends.mdx +++ b/docs/pages/reference/backends.mdx @@ -651,8 +651,8 @@ Service reads these parameters to configure its interactions with S3: - `use_fips_endpoint=true` - [Configure S3 FIPS endpoints](#configuring-aws-fips-endpoints) -- `use_s3_path_style` - Whether to use path-style instead of virtual-host-style URLs for the - bucket. Only applies when a custom endpoint is set. Defaults to true when unset. If used +- `use_s3_virtual_style_addressing` - Whether to use virtual-host-style instead of path-style URLs for the + bucket. Only applies when a custom endpoint is set. Defaults to false when unset. If used without a custom endpoint set, this option has no effect. ### S3 IAM policy diff --git a/lib/events/s3sessions/s3handler.go b/lib/events/s3sessions/s3handler.go index ef1d86637e183..2313fc27b7e61 100644 --- a/lib/events/s3sessions/s3handler.go +++ b/lib/events/s3sessions/s3handler.go @@ -99,6 +99,11 @@ type Config struct { DisableServerSideEncryption bool // UseVirtualStyleAddressing use a virtual-hosted–style URI. + // Path style e.g. https://s3.region-code.amazonaws.com/bucket-name/key-name + // Virtual hosted style e.g. https://bucket-name.s3.region-code.amazonaws.com/key-name + // Teleport defaults to path-style addressing for better interoperability + // with 3rd party S3-compatible services out of the box. + // See https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html for more details. UseVirtualStyleAddressing bool }