fix default region reversion
Commit 215640096f
caused the default
region for S3 to change to us-east-2. This was due to regionInfo having
an undocumented property that the first item in the list is for the
default region.
Avoid relying on regionInfo for defaultRegion.
Sponsored-by: Dartmouth College's DANDI project
This commit is contained in:
parent
215640096f
commit
fed5e00a18
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
{- Amazon Web Services common infrastructure.
|
||||
-
|
||||
- Copyright 2011-2014 Joey Hess <id@joeyh.name>
|
||||
- Copyright 2011-2025 Joey Hess <id@joeyh.name>
|
||||
-
|
||||
- Licensed under the GNU AGPL version 3 or higher.
|
||||
-}
|
||||
|
@ -40,7 +40,8 @@ regionMap :: Service -> M.Map Text Region
|
|||
regionMap = M.fromList . regionInfo
|
||||
|
||||
defaultRegion :: Service -> Region
|
||||
defaultRegion = snd . fromMaybe (error "internal") . headMaybe . regionInfo
|
||||
defaultRegion S3 = "US"
|
||||
defaultRegion Glacier = "us-east-1"
|
||||
|
||||
data ServiceRegion = BothRegion Region | S3Region Region | GlacierRegion Region
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue