Remove the startup authentication check from the cloudwatch output (#4695)

This commit is contained in:
Daniel Nelson 2018-09-18 09:07:28 -07:00 committed by GitHub
parent 77f669344b
commit f05fdde48b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 14 deletions

View File

@ -9,7 +9,6 @@ import (
"github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/cloudwatch" "github.com/aws/aws-sdk-go/service/cloudwatch"
"github.com/aws/aws-sdk-go/service/sts"
"github.com/influxdata/telegraf" "github.com/influxdata/telegraf"
internalaws "github.com/influxdata/telegraf/internal/config/aws" internalaws "github.com/influxdata/telegraf/internal/config/aws"
@ -209,20 +208,7 @@ func (c *CloudWatch) Connect() error {
EndpointURL: c.EndpointURL, EndpointURL: c.EndpointURL,
} }
configProvider := credentialConfig.Credentials() 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) c.svc = cloudwatch.New(configProvider)
return nil return nil
} }