aws-samples / aws-samples/amazon-cloudwatch-container-insights

aws:policy/CloudWatchAgentServerPolicy is lacking ec2:DescribeTags policy

Open
#154 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Shell
Stars
178
Forks
117
Avg merge
1d 10h
Merged PRs (30d)
3

Description

I am attempting to follow the instructions at https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContainerInsights-Prometheus-Setup.html. However the pod for Prometheus does not come up:

```
2023/12/18 01:28:20 Describe EC2 Tag Fail. Will retry the request: UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:sts::xxx:assumed-role/yyy-workernodes/i-zzz is not authorized to perform: ec2:DescribeTags because no identity-based policy allows the ec2:DescribeTags action
```

The most likely cause is that the managed policy `arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy` is lacking said permission.

Contributor guide

Open the contributing guide

Research direction

Start with the linked AWS Container Insights Prometheus setup instructions and the reported UnauthorizedOperation message. Inspect the permissions associated with arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy and verify whether ec2:DescribeTags is required for this setup. Done means the required permission gap is confirmed and the Prometheus pod can start without this authorization error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.