Skip to content

Commit

Permalink
Remove AWS credential check from cloudwatch output (#3583)
Browse files Browse the repository at this point in the history
This method is reported to not work with IAM Instance Profiles, and we
do not want to make any calls that would require additional permissions.

(cherry picked from commit 5b40173)
  • Loading branch information
danielnelson committed Dec 14, 2017
1 parent 425b6f7 commit fe91c77
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions plugins/outputs/cloudwatch/cloudwatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -71,20 +70,7 @@ func (c *CloudWatch) Connect() error {
Token: c.Token,
}
configProvider := credentialConfig.Credentials()

stsService := sts.New(configProvider)

params := &sts.GetSessionTokenInput{}

_, err := stsService.GetSessionToken(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
}

Expand Down

0 comments on commit fe91c77

Please sign in to comment.