probe AWS datacenter
authorJoey Hess <joeyh@joeyh.name>
Wed, 13 Aug 2025 19:21:22 +0000 (15:21 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 13 Aug 2025 19:23:31 +0000 (15:23 -0400)
commit3b1702e6583d1093664f4fef74a2a755dbf9dce6
tree2237874834bc621d596156f0961cf12228194c33
parentfed5e00a180691784e3a1183a5a426e042c5f06c
probe AWS datacenter

S3: When initremote is given the name of a bucket that already exists,
automatically set datacenter to the right value, rather than needing it to
be explicitly set.

This needs aws-0.23. But, initremote stores the datacenter value, so
a remote set up this way can be used with git-annex built with an older aws.

This is not done when signature=anonymous, because in that case,
using AWS.defaultRegion works fine for accessing buckets on other
datacenters.

It feels a bit round-about to need to do this probing. But without it,
the problem seems to be that, with a v4 signature, the location constraint
is included in the Authorization header. When that is the wrong location,
AWS S3 rejects it. I do wonder though if there is an easier way that I
am currently missing.

Sponsored-by: Dartmouth College's DANDI project
CHANGELOG
Remote/S3.hs
doc/bugs/fails_to_authenticate_into_S3_for_initremote__63__/comment_5_4f41ad125c1af26cb94bd40c61cfcd9f._comment [new file with mode: 0644]
doc/special_remotes/S3.mdwn