Amazon CloudWatch permissions reference
The following table lists each CloudWatch API operation and the corresponding actions for
which you can grant permissions to perform the action. You specify the actions in the
policy's Action field, and you specify a wildcard character (*) as the
resource value in the policy's Resource field.
You can use AWS-wide condition keys in your CloudWatch policies to express conditions. For a complete list of AWS-wide keys, see AWS Global and IAM Condition Context Keys in the IAM User Guide.
To specify an action, use the cloudwatch: prefix followed by the API
operation name. For example: cloudwatch:GetMetricData,
cloudwatch:ListMetrics, or cloudwatch:* (for all CloudWatch
actions).
Topics
CloudWatch API operations and required permissions for actions
CloudWatch Application Signals API operations and required permissions for actions
CloudWatch Contributor Insights API operations and required permissions for actions
CloudWatch Events API operations and required permissions for actions
CloudWatch Logs API operations and required permissions for actions
Amazon EC2 API operations and required permissions for actions
Amazon EC2 Auto Scaling API operations and required permissions for actions
CloudWatch API operations and required permissions for actions
| CloudWatch API operations | Required permissions (API actions) |
|---|---|
|
Required to create a resource metrics configuration that enables detailed monitoring for a resource. To restrict which resources a principal can target, use the
|
|
|
Required to delete an alarm. |
|
|
Required to delete a dashboard. |
|
|
Required to delete a metric stream. |
|
|
Required to delete a resource metrics configuration and disable detailed monitoring for a resource. To restrict which resources a principal can target, use the
|
|
|
Required to view alarm history. To retrieve information about
composite alarms, your
|
|
|
Required to retrieve information about alarms. To retrieve information about composite alarms, your
|
|
|
Required to view alarms for a metric. |
|
|
Required to disable an alarm action. |
|
|
Required to enable an alarm action. |
|
|
Required to display data about existing dashboards. |
|
|
Required to graph metric data in the CloudWatch console, to retrieve large batches of metric data, and perform metric math on that data. |
|
|
Required to view graphs in other parts of the CloudWatch console and in dashboard widgets. |
|
|
Required to view information about a metric stream. |
|
|
Required to retrieve a snapshot graph of one or more CloudWatch metrics as a bitmap image. |
|
|
GetMonitoringAssessment |
Required to view the status, progress, scope, and retention of a monitoring assessment. This is a read-level action. |
|
Required to retrieve the status of OpenTelemetry enrichment for vended metrics. |
|
|
Profile query operations
( |
Required to query profile data. This permission covers every operation in the profiles query API. You can't use API keys to query profile data. This is a Read action on the |
|
Required to retrieve the resource metrics configuration for a resource. To restrict which resources a principal can target, use the
|
|
|
Required to view the list of CloudWatch dashboards in your account. |
|
|
ListEntitiesForMetric (CloudWatch console-only permission) |
Required to find the entities associated with a metric. Required to explore related telemetry within the CloudWatch console. |
|
Required to view or search metric names within the CloudWatch console and in the CLI. Required to select metrics on dashboard widgets. |
|
|
Required to view or search the list of metric streams in the account. |
|
|
ListMonitoringAssessmentResults |
Required to list the recommendations that a monitoring assessment produced. This is a list-level action. |
|
ListMonitoringAssessments |
Required to list the monitoring assessments in the account. This is a list-level action. |
|
Required to list the tags associated with a CloudWatch resource. |
|
|
Required to create a composite alarm. To create a composite alarm, your
|
|
|
Required to create a dashboard or update an existing dashboard. |
|
|
Required to create or update an alarm. |
|
|
Required to create metrics. |
|
|
Required to create a metric stream. |
|
|
Profile ingestion through the OTLP endpoint
( |
Required to send profile data. To send profile data with an API
key, This is a Write action on the |
|
Required to manually set an alarm's state. |
|
|
Required to start the flow of metrics in a metric stream. |
|
|
StartMonitoringAssessment |
Required to start a monitoring assessment that produces recommendations to improve observability. This is a read-level action. The caller must also have |
|
Required to enable OpenTelemetry enrichment for vended metrics, making them queryable via PromQL. |
|
|
Required to temporarily stop the flow of metrics in a metric stream. |
|
|
Required to disable OpenTelemetry enrichment for vended metrics. |
|
|
Required to add or update tags on CloudWatch resources such as alarms and Contributor Insights rules. |
|
|
Required to remove tags from CloudWatch resources . |
|
|
Required to update a resource metrics configuration, including the metric selections for a resource. To restrict which resources a principal can target, use the
|
CloudWatch Recommendations permissions
With CloudWatch Recommendations, you can assess the alarms and metrics in your account and get recommendations to improve your monitoring. You use it from the Recommendations panel in Accelerated Compute Insights. CloudWatch Recommendations uses the following actions:
-
cloudwatch:StartMonitoringAssessment(read) starts an assessment. -
cloudwatch:GetMonitoringAssessment(read) returns the status, progress, scope, and retention of an assessment. -
cloudwatch:ListMonitoringAssessments(list) lists the assessments in your account. -
cloudwatch:ListMonitoringAssessmentResults(list) lists the recommendations that an assessment produced.
An assessment is not a resource that has an ARN, so these actions do not support
resource-level permissions. Use "Resource": "*" in policy statements
for these actions.
The CloudWatchFullAccessV2 managed policy grants all four actions. For the CloudWatch actions that CloudWatchReadOnlyAccess grants, see CloudWatchReadOnlyAccess.
How CloudWatch Recommendations reads your account
CloudWatch Recommendations does not assume a role in your account. An assessment
reads your account with a forward access session for the principal that called
StartMonitoringAssessment. The session can do only what that
principal can do. An assessment reads only the calling account, and only
what the caller could read directly. You don't create a role or grant
iam:PassRole. For more information, see Forward
access sessions in the IAM User Guide.
An assessment reads your alarms and metrics with the following actions, so the principal that starts it needs these permissions too:
cloudwatch:DescribeAlarmscloudwatch:GetMetricDatacloudwatch:GetMetricStatisticscloudwatch:GetOTelEnrichmentcloudwatch:ListMetrics
Before it records an assessment, StartMonitoringAssessment
makes one small read-only call for each of these actions. If any call is
denied, StartMonitoringAssessment returns
AccessDeniedException, names every denied action, and does not
start the assessment. The metric calls read the namespace
CloudWatchRecommendations/PermissionPreflight, which holds no
data, so you might see that namespace in your CloudTrail events.
Some recommendations set an alarm threshold as a percentage of a resource setting, such as provisioned capacity, or of a service quota. To calculate these thresholds, the assessment also reads the resource and the quota. The principal that starts the assessment needs these permissions:
cloudformation:GetResource, to read the resource through AWS Cloud Control API (Cloud Control API)servicequotas:GetServiceQuotaandservicequotas:GetAWSDefaultServiceQuota, to read the quota
Cloud Control API also uses your permissions to read the resource, so you
need the read permissions of each resource type that you want assessed. To find
them, look at handlers.read.permissions in the resource type's
schema. For example, the
following AWS CLI command shows the schema for Lambda functions:
aws cloudformation describe-type \ --type RESOURCE \ --type-name AWS::Lambda::Function \ --query Schema \ --output text
Because the assessment makes these reads on your behalf, the
aws:ViaAWSService condition key is true for them.
If a policy denies requests that don't come from a specific IP address range
or VPC, it also denies these reads. To allow them, add
"Bool": {"aws:ViaAWSService": "false"} to the condition of the
Deny statement. For more information, see Example: Allow assessment reads when a policy restricts the source IP address.
An assessment does not change your alarms or any other resource. You review a recommendation and decide whether to apply it.
AWS encrypts assessment results with an AWS owned key and deletes them when the assessment's retention period ends. You can set a retention period of 1 to 90 days when you start the assessment. The default is 90 days.
Example: Allow a principal to run assessments and read recommendations
The following policy grants the permissions to start an assessment from the Recommendations panel and to read its results. The second statement grants the reads that the assessment makes of your alarms and metrics. The third statement grants the reads that it makes to calculate thresholds based on a resource setting or a service quota.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "CloudWatchRecommendations", "Effect": "Allow", "Action": [ "cloudwatch:StartMonitoringAssessment", "cloudwatch:GetMonitoringAssessment", "cloudwatch:ListMonitoringAssessments", "cloudwatch:ListMonitoringAssessmentResults" ], "Resource": "*" }, { "Sid": "AssessmentReads", "Effect": "Allow", "Action": [ "cloudwatch:DescribeAlarms", "cloudwatch:GetMetricData", "cloudwatch:GetMetricStatistics", "cloudwatch:GetOTelEnrichment", "cloudwatch:ListMetrics" ], "Resource": "*" }, { "Sid": "ThresholdReads", "Effect": "Allow", "Action": [ "cloudformation:GetResource", "servicequotas:GetServiceQuota", "servicequotas:GetAWSDefaultServiceQuota" ], "Resource": "*" } ] }
For thresholds based on a resource setting, also grant the read permissions of each resource type that you want assessed. For more information, see How CloudWatch Recommendations reads your account.
Example: Allow assessment reads when a policy restricts the source IP address
The following policy denies requests from outside the IP address range
198.51.100.0/24. The aws:ViaAWSService condition
excludes requests that an AWS service makes on your behalf, so the
assessment can still read your account.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "DenyOutsideCorporateNetwork", "Effect": "Deny", "Action": "*", "Resource": "*", "Condition": { "NotIpAddress": { "aws:SourceIp": "198.51.100.0/24" }, "Bool": { "aws:ViaAWSService": "false" } } } ] }
CloudWatch Application Signals API operations and required permissions for actions
| CloudWatch Application Signals API operations | Required permissions (API actions) |
|---|---|
|
Required to retrieve service level objective budget reports. |
|
|
Required to create a service level objective (SLO). |
|
|
Required to delete a service level objective (SLO). |
|
|
Required to retrieve information about a service discovered by Application Signals. |
|
|
Required to retrieve information about a service level objective (SLO). |
|
|
ListObservedEntities |
Grants permission to list entities that are associated with other entities. |
|
Required to retrieve a list of service dependencies of a service that you specify. This service and the dependencies were discovered by Application Signals. |
|
|
Required to retrieve a list of dependents that invoked a service that you specify. This service and the dependents were discovered by Application Signals. |
|
|
Required to retrieve a list of service level objectives (SLOs) in the account. |
|
|
Required to retrieve a list of service operations of a service that you specify. This service and the dependencies were discovered by Application Signals. |
|
|
Required to retrieve a list of services discovered by Application Signals. |
|
|
Required to retrieve a list of the tags associated with a resource. |
|
|
Required to be able to enable Application Signals in the account and create the required service-linked role. |
|
|
Required to be able to add tags to resources. |
|
|
Required to be able to remove tags from resources. |
|
|
Required to update an existing service level objective |
CloudWatch Contributor Insights API operations and required permissions for actions
When you grant a user the cloudwatch:PutInsightRule permission,
by default that user can create a rule that evaluates any log group in CloudWatch Logs.
You can add IAM policy conditions that limit these permissions for a user to
include and exclude specific log groups. For more information, see Condition keys for Contributor Insights log group access.
| CloudWatch Contributor Insights API operations | Required permissions (API actions) |
|---|---|
|
Required to delete Contributor Insights rules. |
|
|
Required to view the Contributor Insights rules in your account. |
|
|
Required to enable Contributor Insights rules. |
|
|
Required to retrieve time series data and other statistics collectd by Contributor Insights rules. |
|
|
Required to create Contributor Insights rules. See the Important note at the beginning of this table. |
CloudWatch Events API operations and required permissions for actions
| CloudWatch Events API operations | Required permissions (API actions) |
|---|---|
|
Required to delete a rule. |
|
|
Required to list the details about a rule. |
|
|
Required to disable a rule. |
|
|
Required to enable a rule. |
|
|
Required to list rules associated with a target. |
|
|
Required to list all rules in your account. |
|
|
Required to list all targets associated with a rule. |
|
|
Required to add custom events that can be matched to rules. |
|
|
Required to create or update a rule. |
|
|
Required to add targets to a rule. |
|
|
Required to remove a target from a rule. |
|
|
Required to test an event pattern against a given event. |
CloudWatch Logs API operations and required permissions for actions
CloudWatch Logs permissions can be found in the CloudWatch Logs user guide.
Amazon EC2 API operations and required permissions for actions
| Amazon EC2 API operations | Required permissions (API actions) |
|---|---|
|
Required to view EC2 instance status details. |
|
|
Required to view EC2 instance details. |
|
|
Required to reboot an EC2 instance. |
|
|
Required to stop an EC2 instance. |
|
|
Required to terminate an EC2 instance. |
Amazon EC2 Auto Scaling API operations and required permissions for actions
| Amazon EC2 Auto Scaling API operations | Required permissions (API actions) |
|---|---|
|
Scaling |
Required to scale an Auto Scaling group. |
|
Trigger |
Required to trigger an Auto Scaling action. |