awslabs / collectd-cloudwatch

A collectd plugin for sending data to Amazon CloudWatch
MIT License
199 stars 131 forks source link

IAM role not working when used in a ECS Task #58

Closed chdeliens closed 6 years ago

chdeliens commented 6 years ago

Looks like the metadata reader Python script is not supporting the way credentials are retrieved when running as a Docker container on a ECS cluster.

I just checked /src/cloudwatch/modules/configuration/metadatareader.py and found out it's using "latest/meta-data/iam/security-credentials/" instead of ENV variable $AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.

Plus, it's using a different metadata server. It should use 169.254.170.2.

Any plans to support ECS tasks?

yimuniao commented 6 years ago

Currently, we have no plan to support to ECS tasks. This is a opensource project, we appreciate the contributions

chdeliens commented 6 years ago

OK, good to know, thanks!