Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Cloudwatch Input Credentials #1078

Closed
johnrengelman opened this issue Apr 22, 2016 · 2 comments · Fixed by #1079
Closed

AWS Cloudwatch Input Credentials #1078

johnrengelman opened this issue Apr 22, 2016 · 2 comments · Fixed by #1079

Comments

@johnrengelman
Copy link
Contributor

The credential chain being used for the AWS Cloudwatch input will cause issues for people when deploying on a EC2 instance.

Specifically, having the EC2RoleProvider be the first provide in the chain (https://github.com/influxdata/telegraf/blob/master/plugins/inputs/cloudwatch/cloudwatch.go#L159) will force the credentials always use the IAM role when on EC2 with no ability to override the credentials by using the environment variables.

The Ec2RoleProvider should be the last role in the chain. This way, you simply do not provide the envvars and it will fall through to the IAM profile, but you can override it by supplying the proper environment variables.

@johnrengelman
Copy link
Contributor Author

In fact, the default credential chain should just be used - https://github.com/aws/aws-sdk-go/blob/master/aws/defaults/defaults.go#L84

@sparrc
Copy link
Contributor

sparrc commented Apr 22, 2016

I agree we should just use the default, I will change that, thanks for the report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants