Commit
215640096f6a3469c119d50373f3035cf19fe130 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
{- 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.
-}
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