Skip to content

Commit

Permalink
Log errors from the credentials chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Alonso Dominguez committed Aug 8, 2018
1 parent dedc309 commit 7f7d266
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"strings"
"time"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
Expand Down Expand Up @@ -500,9 +501,14 @@ func GetAugmentedTasks(svc *ecs.ECS, svcec2 *ec2.EC2, clusterArns []*string) ([]

func main() {
flag.Parse()
sess := session.New()

config := aws.NewConfig().WithCredentialsChainVerboseErrors(true)

// Initialise AWS Service clients
sess := session.New(config)
svc := ecs.New(sess)
svcec2 := ec2.New(sess)

work := func() {
clusters, err := GetClusters(svc)
if err != nil {
Expand Down

0 comments on commit 7f7d266

Please sign in to comment.