From 0df99075cc9ce1d985103dcd6a2b9bb1c0b10589 Mon Sep 17 00:00:00 2001 From: David Killmon Date: Fri, 31 Jul 2020 11:38:41 -0700 Subject: [PATCH] add shared config state to session By adding this flag to the session, we force the AWS Go SDK to read the ~/.aws/config file. By default, the Go SDK doesn't read this file which is often not what we or customers expect. Many customers store their assume role based prfoiles in the .aws/config file rather than the .aws/credentials file. (This is what the AWS CLI does, by default - but that's because this parameter is enabled by default in the python SDK). Signed-off-by: Nicolas De Loof --- ecs/pkg/amazon/backend/backend.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ecs/pkg/amazon/backend/backend.go b/ecs/pkg/amazon/backend/backend.go index f5bba4ed..4fd40c2b 100644 --- a/ecs/pkg/amazon/backend/backend.go +++ b/ecs/pkg/amazon/backend/backend.go @@ -8,7 +8,8 @@ import ( func NewBackend(profile string, region string) (*Backend, error) { sess, err := session.NewSessionWithOptions(session.Options{ - Profile: profile, + Profile: profile, + SharedConfigState: session.SharedConfigEnable, Config: aws.Config{ Region: aws.String(region), },