summaryrefslogtreecommitdiff
path: root/Remote/Helper/AWS.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Remote/Helper/AWS.hs')
-rw-r--r--Remote/Helper/AWS.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Remote/Helper/AWS.hs b/Remote/Helper/AWS.hs
index 4919b4b40..7d23ac63d 100644
--- a/Remote/Helper/AWS.hs
+++ b/Remote/Helper/AWS.hs
@@ -50,12 +50,18 @@ regionInfo service = map (\(t, r) -> (t, fromServiceRegion r)) $
[ ("US East (N. Virginia)", [S3Region "US", GlacierRegion "us-east-1"])
, ("US West (Oregon)", [BothRegion "us-west-2"])
, ("US West (N. California)", [BothRegion "us-west-1"])
- , ("EU (Frankfurt)", [BothRegion "eu-central-1"])
, ("EU (Ireland)", [S3Region "EU", GlacierRegion "eu-west-1"])
, ("Asia Pacific (Singapore)", [S3Region "ap-southeast-1"])
, ("Asia Pacific (Tokyo)", [BothRegion "ap-northeast-1"])
, ("Asia Pacific (Sydney)", [S3Region "ap-southeast-2"])
, ("South America (São Paulo)", [S3Region "sa-east-1"])
+ -- These need signature V4 support, which has not landed in
+ -- the aws library.
+ -- See https://github.com/aristidb/aws/pull/199
+ -- , ("EU (Frankfurt)", [BothRegion "eu-central-1"])
+ -- , ("Asia Pacific (Seoul)", [S3Region "ap-northeast-2"])
+ -- , ("Asia Pacific (Mumbai)", [S3Region "ap-south-1"])
+ -- , ("US East (Ohio)", [S3Region "us-east-2"])
]
fromServiceRegion (BothRegion s) = s
@@ -69,6 +75,7 @@ regionInfo service = map (\(t, r) -> (t, fromServiceRegion r)) $
s3HostName :: Region -> B.ByteString
s3HostName "US" = "s3.amazonaws.com"
s3HostName "EU" = "s3-eu-west-1.amazonaws.com"
+s3HostName "cn-north-1" = "s3.cn-north-1.amazonaws.com.cn"
s3HostName r = encodeUtf8 $ T.concat ["s3-", r, ".amazonaws.com"]
s3DefaultHost :: String