Permissions for fleet cost and usage
The Observability tab calls AWS services from your browser with the credentials of your console session. Its queries can only read what your IAM identity can already read in the registry’s account. The tab adds no new AWS Agent Registry actions.
Permissions to view fleet cost and usage
Grant these permissions to the IAM identity that views the Observability tab. The identity must be in the account that owns the organization-scoped registry. The following table lists each action and why the tab needs it.
| Action | Why the tab needs it |
|---|---|
|
|
Reads the registry and its auto-detection status. |
|
|
Reads the registry’s records to name agents and link to them. |
|
|
Runs the CloudWatch Logs Insights queries behind each view. |
|
|
Finds the log groups that each query reads. Each query chooses its log groups with the |
|
|
Reads the results of those queries. |
|
|
Stops a running query when you change the date range or filters, choose Refresh, or leave the tab, so that it doesn’t keep scanning. |
|
|
Checks whether the span log groups index the session ID, so that the Sessions view reads less data. |
|
|
Identifies your organization and its management account. |
|
|
Shows account names next to account IDs. |
|
|
Checks that trusted access for CloudWatch is turned on. |
|
|
Identifies the delegated administrator for AWS Agent Registry, which can own the organization-scoped registry. |
|
|
Checks that a healthy centralization rule copies spans into the registry’s account. |
Only the management account and the delegated administrator for CloudWatch can read your organization’s centralization rules. If the registry’s account is neither, the tab can’t confirm the rule. It shows a warning, and it still shows the data that has reached the account.
The CloudWatchLogsReadOnlyAccess managed policy includes the logs actions in the table.
The following example policy grants the permissions to view the tab. Replace 111122223333 with the ID of the account that owns the registry, and us-west-2 with the registry’s Region:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "ReadRegistry", "Effect": "Allow", "Action": [ "agent-registry:GetRegistry", "agent-registry:ListRegistryRecords" ], "Resource": "arn:aws:agent-registry:us-west-2:111122223333:registry/*" }, { "Sid": "RunCostQueries", "Effect": "Allow", "Action": [ "logs:StartQuery", "logs:DescribeFieldIndexes" ], "Resource": "arn:aws:logs:us-west-2:111122223333:log-group:*" }, { "Sid": "FindQueryLogGroups", "Effect": "Allow", "Action": "logs:DescribeLogGroups", "Resource": "arn:aws:logs:us-west-2:111122223333:*" }, { "Sid": "ReadCostQueryResults", "Effect": "Allow", "Action": [ "logs:GetQueryResults", "logs:StopQuery" ], "Resource": "*" }, { "Sid": "CheckOrganizationSetup", "Effect": "Allow", "Action": [ "organizations:DescribeOrganization", "organizations:ListAccounts", "organizations:ListAWSServiceAccessForOrganization", "organizations:ListDelegatedAdministrators", "observabilityadmin:ListCentralizationRulesForOrganization" ], "Resource": "*" } ] }
Because the queries read every Standard log group in the account that holds span events, logs:StartQuery applies to the account’s log groups, not only to the centralized copies. Any identity that can call logs:StartQuery in the account can run the same queries in the CloudWatch console. Grant access to the Observability tab the way that you grant access to the account’s logs.
Permissions to set up fleet cost and usage
You need the following permissions in the management account to complete Setting up fleet cost and usage. The following table lists each action and why it’s needed.
| Action | Why it’s needed |
|---|---|
|
|
Turns on trusted access for CloudWatch ( |
|
|
Turns off trusted access for CloudWatch. Needed only to turn it off. |
|
|
Creates the |
|
|
Checks whether the service-linked role exists. |
|
|
Creates the centralization rule in CloudWatch. The management account or the delegated administrator for CloudWatch can create the rule. |
For more information about the permissions that CloudWatch Logs centralization needs, see Cross-account cross-Region log centralization in the Amazon CloudWatch Logs User Guide.
A service control policy (SCP) in your organization can deny any of these actions even when your IAM policy allows them. If the tab reports that access was denied for an action, check your SCPs as well as your IAM policy.