Hello there, I deployed Grafana inside our k8s cluster with kind statefulset
,
here I need to add cloudwatch plugins using ARN as Auth Provider, using https://github.com/uswitch/kiam to communicate all our service with AWS IAM,
I already deep dive in Grafana AWS Cloudwatch Official Docs and https://github.com/uswitch/kiam/blob/master/docs/IAM.md,
and searching in grafana community here,
but no luck,
I already attached this to Trust Relationship in my grafana role too :
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Action": "sts:AssumeRole"
},
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::123456789012:role/kiam-server"
},
"Action": "sts:AssumeRole"
}
]
}
any one can help me to accomplished this?
noticable log :
in kiam-server
{"credentials.access.key":"XXXXXXXXXXXXXXX","credentials.expiration":"2019-12-16T06:24:19Z","credentials.role":"arn:aws:iam::XXXXXXXXXXXXXXX:role/grafana-dev-iam-role","generation.metadata":0,"level":"info","msg":"fetched credentials","pod.iam.role":"arn:aws:iam::XXXXXXXXXXXXXXX:role/grafana-dev-iam-role","pod.name":"grafana-0","pod.namespace":"istio-system","pod.status.ip":"","pod.status.phase":"Pending","resource.version":"45664633","time":"2019-12-16T06:06:05Z"}
in grafana
pods :
t=2019-12-16T06:15:47+0000 lvl=eror msg="Metric request error" logger=context userId=1 orgId=1 uname=admin error="Failed to call ec2:getAwsConfig, AccessDenied: User: arn:aws:sts::XXXXXXXXXXXXXXX:assumed-role/grafana-dev-iam-role/kiam-kiam is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::XXXXXXXXXXXXXXX:role/grafana-dev-iam-role\n\tstatus code: 403, request id: 7ff33a3a-1fcb-11ea-b0f2-d3fa2c1d9a6b"
#aws #kiam