--- /dev/null
+[[!comment format=mdwn
+ username="jpds"
+ avatar="http://cdn.libravatar.org/avatar/24d746ec6a7726b162c12ecceb3ee267"
+ subject="comment 4"
+ date="2023-01-24T15:55:36Z"
+ content="""
+I think this can all be removed as only the 'region' should be in the `S3.*` calls:
+
+```
+diff --git a/Remote/S3.hs b/Remote/S3.hs
+index f5014202e..d017378a8 100644
+--- a/Remote/S3.hs
++++ b/Remote/S3.hs
+@@ -913,14 +913,7 @@ s3Configuration c = cfg
+ Nothing -> S3.s3RequestStyle cfg
+ }
+ where
+- h = fromJust $ getRemoteConfigValue hostField c
+ datacenter = fromJust $ getRemoteConfigValue datacenterField c
+- -- When the default S3 host is configured, connect directly to
+- -- the S3 endpoint for the configured datacenter.
+- -- When another host is configured, it's used as-is.
+- endpoint
+- | h == AWS.s3DefaultHost = AWS.s3HostName $ T.pack datacenter
+- | otherwise = T.encodeUtf8 $ T.pack h
+ port = case getRemoteConfigValue portField c of
+ Just s ->
+ case reads s of
+@@ -948,8 +941,8 @@ s3Configuration c = cfg
+ | otherwise -> AWS.HTTP
+ cfg = case getRemoteConfigValue signatureField c of
+ Just (SignatureVersion 4) ->
+- S3.s3v4 proto endpoint False S3.SignWithEffort
+- _ -> S3.s3 proto endpoint False
++ S3.s3v4 proto datacenter False S3.SignWithEffort
++ _ -> S3.s3 proto datacenter False
+
+ data S3Info = S3Info
+ { bucket :: S3.Bucket
+```
+
+But now I get this as an error and I do not know why:
+
+```
+initremote garage (checking bucket...) (creating bucket in garage...)
+git-annex: getRemoteConfigValue datacenter found value of unexpected type [Char]. This is a bug in git-annex!
+CallStack (from HasCallStack):
+ error, called at ./Annex/SpecialRemote/Config.hs:179:28 in main:Annex.SpecialRemote.Config
+ getRemoteConfigValue, called at ./Remote/S3.hs:916:33 in main:Remote.S3
+failed
+initremote: 1 failed
+```
+"""]]