diff --git a/s3/s3.go b/s3/s3.go index 819cddd8f1ab7b23d4c9e9165eec5a449c5c3e41..17ca5223a4cbe6787dec5030e6b7dd11484b8144 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -5,6 +5,7 @@ import ( "encoding/binary" "fmt" "net/url" + "os" "path" "strings" "time" @@ -87,8 +88,7 @@ type SessionWithHelpers struct { } func GetSession(region ...string) *SessionWithHelpers { - - s3Region := "af-south-1" + s3Region := os.Getenv("AWS_REGION") // Set custom region if region != nil && len(region) > 0 {