IAM role to prometheus instance

1,303 views
Skip to first unread message

ashok....@gslab.com

unread,
Apr 6, 2017, 7:11:25 AM4/6/17
to Prometheus Users
Hello Guys,

Can I assign EC2 Read Only Access IAM role to prometheus instance instead of using AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY  keys in ec2_sd_config ?

Thanks,

Brian Brazil

unread,
Apr 6, 2017, 7:57:40 AM4/6/17
to ashok....@gslab.com, Prometheus Users
On 6 April 2017 at 12:11, ashok...@gmail.com <ashok....@gslab.com> wrote:
Hello Guys,

Can I assign EC2 Read Only Access IAM role to prometheus instance instead of using AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY  keys in ec2_sd_config ?

dgo...@gmail.com

unread,
Jan 29, 2019, 11:54:08 AM1/29/19
to Prometheus Users
Example in link contains keys ....

scrape_configs:
  - job_name: 'node'
    ec2_sd_configs:
      - region: eu-west-1
        access_key: PUT_THE_ACCESS_KEY_HERE
        secret_key: PUT_THE_SECRET_KEY_HERE
        port: 9100

kayanum...@donuts.ne.jp

unread,
Mar 15, 2019, 4:33:05 AM3/15/19
to Prometheus Users
Does this answer really solve question? As he says, he'd like to use IAM Instance role, and he doesn't want to use AWS_ACCESS_KEY and AWS_SECRET_ACCESS_KEY. This article describe a way to use access_key and secret_key, so this doesn't works.

NOTE: I'm having same question!

2017年4月6日木曜日 20時57分40秒 UTC+9 Brian Brazil:

Moses Moore

unread,
Mar 18, 2019, 11:20:34 AM3/18/19
to Prometheus Users

```
# AWS Role ARN, an alternative to using AWS API keys.
[ role_arn: <string> ]
```

What happens when you use this instead of "access_key" and "secret_key" ?
Reply all
Reply to author
Forward
0 new messages