source-controller icon indicating copy to clipboard operation
source-controller copied to clipboard

Cannot access S3 Bucket from another region with regional endpoint

Open artem-nefedov opened this issue 2 years ago • 0 comments

Description

If you create AWS S3 Bucket in one region (e.g. us-west-2), and create Bucket object that uses regional S3 endpoint from another region (e.g.endpoint: s3.eu-central-1.amazonaws.com), source controller will report an error: Head "https://my-bucket-name.s3.dualstack.eu-central-1.amazonaws.com/": 301 response missing Location header. It seems like redirect isn't handled correctly.

Same thing work normally with other tools (e.g. awscli):

$ aws s3api head-bucket --bucket my-bucket-name --endpoint-url "https://my-bucket-name.s3.dualstack.eu-central-1.amazonaws.com/"
$ echo $?
0

Versions

$ flux --version
flux version 0.16.2
$ flux check
► checking prerequisites
✔ kubectl 1.21.3 >=1.18.0-0
✔ Kubernetes 1.21.2-eks-0389ca3 >=1.16.0-0
► checking controllers
✔ helm-controller: deployment ready
► private-repo.com/fluxcd/helm-controller:v0.11.2
✔ kustomize-controller: deployment ready
► private-repo.com/fluxcd/kustomize-controller:v0.13.3
✔ notification-controller: deployment ready
► private-repo.com/fluxcd/notification-controller:v0.15.1
✔ source-controller: deployment ready
► private-repo.com/fluxcd/source-controller:v0.15.4
✔ all checks passed

artem-nefedov avatar Aug 20 '21 07:08 artem-nefedov