From 96de76b4985c42d709f5355489828068999e815b Mon Sep 17 00:00:00 2001 From: Johan de Klerk <johan@shiplogic.com> Date: Thu, 12 Jan 2023 09:33:41 +0200 Subject: [PATCH] Dont hardcode region --- s3/s3.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/s3/s3.go b/s3/s3.go index 819cddd..17ca522 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 { -- GitLab