From 8d9fd2ff9169573821375b3145c1a9baf1e3baad Mon Sep 17 00:00:00 2001 From: Magnus Kulke Date: Thu, 4 Jul 2019 00:45:12 +0200 Subject: [PATCH] use default region --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index b969c8a..0f17806 100644 --- a/main.go +++ b/main.go @@ -2,7 +2,6 @@ package main import ( "encoding/json" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ecs" "io/ioutil" @@ -45,7 +44,9 @@ func main() { if err != nil { panic(err) } - svc := ecs.New(session.New(&aws.Config{})) + svc := ecs.New(session.Must(session.NewSessionWithOptions(session.Options{ + SharedConfigState: session.SharedConfigEnable, + }))) status := "DRAINING" state := &ecs.UpdateContainerInstancesStateInput{ Cluster: &ecsMetadata.Cluster,