ec2tagger not accepting credentials-file
First of all, thank you for a great product, and a very thourough documentation.
This feels sort of like a support question, yet it could also be intentional, in which case I think it should just be included in the documentation. Feel free to close this and refer me to the right place :-) Or, and very likely, I didn't understand the docs right, IAM is hard :-p
I've been trying to setup Cloudwatch such that it will asumme an IAM role for all operations it needs to do. Getting the outputs working, was painless and generally very easy. However, it seems that the processors-section(ec2tagger) of the configuration, which relies on a credentials file, does not allow configuration with an assumed role. I've tried adding an IAM role to the instance, allowing it to check it's own data, which seems to work.
However, once I try and configure a credentials file to use an assumed role, it breaks. Specifying a credentials file, like credentials1, yields the following error:
2019-12-03T10:25:18Z E! refresh EC2 Instance Tags failed: SharedCredsAccessKey: shared credentials AmazonCloudWatchAgent in *credentials-file* did not contain aws_access_key_id, metrics will be dropped until it got fixed
Just specifying bogus values for both access_key and secret_key doesn't help - as it just uses those values and then fails :-(
I would expect the tag processor to pick up the credcential configuration and assume the assigned role.
credentials1
[AmazonCloudWatchAgent]
credential_source = Ec2InstanceMetadata
role_arn = arn:aws:iam…
[default]
credential_source = Ec2InstanceMetadata
processors-section
[processors]
[[processors.ec2tagger]]
ec2_instance_tag_keys = ["aws:autoscaling:groupName"]
ec2_metadata_tags = ["ImageId", "InstanceId", "InstanceType"]
profile = "AmazonCloudWatchAgent"
refresh_interval_seconds = "2147483647s"
shared_credential_file = "*credentials-file*"
[processors.ec2tagger.tagpass]
metricPath = ["metrics"]
Closing this issue or pull request in advance of archiving this repo. For more information about the decision to archive this repo (and others in the 'awsdocs' org), see the announcement on the AWS News Blog.