You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Support AWS S3 Express One Zone buckets (#229)
# What
This change adds the `S3_SERVICE` configuration variable which will default to `s3` and may be one of `s3express` or `s3`.
It also introduces the `virtual-v2` `S3_STYLE` argument option in support of the connectivity requirement of the S3 Express One Zone (directory) buckets. We are using this as a successor to `virtual` and believe it should work well in all AWS usages but want to be cautious as we make this change.
Many thanks for @hveiga for driving the implementation of this feature in their original pull request.
Setting this variable to s3express will change the "service" used to sign the requests with the V4 header to s3express. Currently the gateway works without this step, but it's advised in the documentation [here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-best-practices.html).
## Other Changes
We are moving the determination of the hostname used to query S3 into the docker entrypoint (or bootstrap script for non-docker installs). If `S3_STYLE` is set to `virtual` (this is the default and aws recommended scheme) then the hostname will be:
```
${S3_BUCKET_NAME}.${S3_SERVER}:${S3_SERVER_PORT}
```
which will be used in these locations:
* The `proxy_path` directive
* The HTTP `Host` header sent to AWS
* The `host` element of the canonical headers used in signing AWS signature V4 requests.
Based on my reading here: https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html
It looks like AWS recommends that the bucket be always prepended and other schemes exist only for backwards compatibility reasons. However, please comment on this discussion if you have concerns #231
Co-authored-by: @hveiga <[email protected]>"
0 commit comments