From f05fdde48ba103200a0dbb5cd5e60e865949bdf0 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Tue, 18 Sep 2018 09:07:28 -0700 Subject: [PATCH] Remove the startup authentication check from the cloudwatch output (#4695) --- plugins/outputs/cloudwatch/cloudwatch.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/plugins/outputs/cloudwatch/cloudwatch.go b/plugins/outputs/cloudwatch/cloudwatch.go index d3bd66303..b5dca364e 100644 --- a/plugins/outputs/cloudwatch/cloudwatch.go +++ b/plugins/outputs/cloudwatch/cloudwatch.go @@ -9,7 +9,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudwatch" - "github.com/aws/aws-sdk-go/service/sts" "github.com/influxdata/telegraf" internalaws "github.com/influxdata/telegraf/internal/config/aws" @@ -209,20 +208,7 @@ func (c *CloudWatch) Connect() error { EndpointURL: c.EndpointURL, } configProvider := credentialConfig.Credentials() - - stsService := sts.New(configProvider) - - params := &sts.GetCallerIdentityInput{} - - _, err := stsService.GetCallerIdentity(params) - - if err != nil { - log.Printf("E! cloudwatch: Cannot use credentials to connect to AWS : %+v \n", err.Error()) - return err - } - c.svc = cloudwatch.New(configProvider) - return nil }