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.
  • Loading branch information
danielnelson authored Dec 14, 2017
1 parent 6638fc6 commit 5b40173
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 5b40173

Please sign in to comment.