From 6f1811ee4dddf995831cda4607d1c08318e519c9 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 3 May 2016 15:17:58 -0700 Subject: [PATCH] config: Migration should save region properly. (#1468) Fixes #1466 --- config-migrate.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config-migrate.go b/config-migrate.go index b0b92f50e..8015b9c42 100644 --- a/config-migrate.go +++ b/config-migrate.go @@ -73,6 +73,10 @@ func migrateV2ToV3() { SecretAccessKey: cv2.Credentials.SecretAccessKey, } srvConfig.Region = cv2.Credentials.Region + if srvConfig.Region == "" { + // Region needs to be set for AWS Signature V4. + srvConfig.Region = "us-east-1" + } srvConfig.Logger.Console = consoleLogger{ Enable: true, Level: "fatal", @@ -124,6 +128,10 @@ func migrateV3ToV4() { srvConfig.Version = globalMinioConfigVersion srvConfig.Credential = cv3.Credential srvConfig.Region = cv3.Region + if srvConfig.Region == "" { + // Region needs to be set for AWS Signature Version 4. + srvConfig.Region = "us-east-1" + } srvConfig.Logger.Console = cv3.Logger.Console srvConfig.Logger.File = cv3.Logger.File srvConfig.Logger.Syslog = cv3.Logger.Syslog