Go to AWS Management Console

In the IAM interface

In the Create policies interface
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowReadingMetricsFromCloudWatch",
"Effect": "Allow",
"Action": [
"cloudwatch:DescribeAlarmsForMetric",
"cloudwatch:ListMetrics",
"cloudwatch:GetMetricStatistics",
"cloudwatch:GetMetricData"
],
"Resource": "*"
},
{
"Sid": "AllowReadingTagsInstancesRegionsFromEC2",
"Effect": "Allow",
"Action": ["ec2:DescribeTags", "ec2:DescribeInstances", "ec2:DescribeRegions"],
"Resource": "*"
},
{
"Sid": "AllowReadingResourcesForTags",
"Effect": "Allow",
"Action": "tag:GetResources",
"Resource": "*"
}
]
}


In the Create policy interface
GrafanaAccessPolicy
In the Tag section, enter key and value
NameGrafanaAccessPolicy
So we have created a policy for Role successfully

In the IAM interface

In the Select trusted entity interface


In the Add permissions interface

In Name, review and create step
GrafanaAccessRoleRole for Grafana Access
Scroll down and select Create role


Complete role creation for EC2 instance