Using identity-based policies (IAM policies) for CloudWatch - Amazon CloudWatch

Using identity-based policies (IAM policies) for CloudWatch

This topic provides examples of identity-based policies that demonstrate how an account administrator can attach permissions policies to IAM identities (that is, users, groups, and roles) and thereby grant permissions to perform operations on CloudWatch resources.


We recommend that you first review the introductory topics that explain the basic concepts and options available to manage access to your CloudWatch resources. For more information, see Access control.

The sections in this topic cover the following:

The following shows an example of a permissions policy.

{ "Version": "2012-10-17", "Statement":[{ "Effect":"Allow", "Action":["cloudwatch:GetMetricData","cloudwatch:ListMetrics"], "Resource":"*", "Condition":{ "Bool":{ "aws:SecureTransport":"true" } } } ] }

This sample policy has one statement that grants permissions to a group for two CloudWatch actions (cloudwatch:GetMetricData, and cloudwatch:ListMetrics), but only if the group uses SSL with the request ("aws:SecureTransport":"true"). For more information about the elements within an IAM policy statement, see Specifying policy elements: Actions, effects, and principals and IAM Policy Elements Reference in IAM User Guide.

Permissions required to use the CloudWatch console

For a user to work with the CloudWatch console, that user must have a minimum set of permissions that allow the user to describe other AWS resources in their account. The CloudWatch console requires permissions from the following services:

  • Amazon EC2 Auto Scaling

  • CloudTrail

  • CloudWatch

  • CloudWatch Events

  • CloudWatch Logs

  • Amazon EC2

  • Amazon ES

  • IAM

  • Kinesis

  • Lambda

  • Amazon S3

  • Amazon SNS

  • Amazon SQS

  • Amazon SWF

  • X-Ray, if you are using the ServiceLens feature

If you create an IAM policy that is more restrictive than the minimum required permissions, the console won't function as intended for users with that IAM policy. To ensure that those users can still use the CloudWatch console, also attach the CloudWatchReadOnlyAccess managed policy to the user, as described in AWS managed (predefined) policies for CloudWatch.

You don't need to allow minimum console permissions for users that are making calls only to the AWS CLI or the CloudWatch API.

The full set of permissions required to work with the CloudWatch console are listed below:

  • application-autoscaling:DescribeScalingPolicies

  • autoscaling:DescribeAutoScalingGroups

  • autoscaling:DescribePolicies

  • cloudtrail:DescribeTrails

  • cloudwatch:DeleteAlarms

  • cloudwatch:DescribeAlarmHistory

  • cloudwatch:DescribeAlarms

  • cloudwatch:GetMetricData

  • cloudwatch:GetMetricStatistics

  • cloudwatch:ListMetrics

  • cloudwatch:PutMetricAlarm

  • cloudwatch:PutMetricData

  • ec2:DescribeInstances

  • ec2:DescribeTags

  • ec2:DescribeVolumes

  • es:DescribeElasticsearchDomain

  • es:ListDomainNames

  • events:DeleteRule

  • events:DescribeRule

  • events:DisableRule

  • events:EnableRule

  • events:ListRules

  • events:PutRule

  • iam:AttachRolePolicy

  • iam:CreateRole

  • iam:GetPolicy

  • iam:GetPolicyVersion

  • iam:GetRole

  • iam:ListAttachedRolePolicies

  • iam:ListRoles

  • kinesis:DescribeStream

  • kinesis:ListStreams

  • lambda:AddPermission

  • lambda:CreateFunction

  • lambda:GetFunctionConfiguration

  • lambda:ListAliases

  • lambda:ListFunctions

  • lambda:ListVersionsByFunction

  • lambda:RemovePermission

  • logs:CancelExportTask

  • logs:CreateExportTask

  • logs:CreateLogGroup

  • logs:CreateLogStream

  • logs:DeleteLogGroup

  • logs:DeleteLogStream

  • logs:DeleteMetricFilter

  • logs:DeleteRetentionPolicy

  • logs:DeleteSubscriptionFilter

  • logs:DescribeExportTasks

  • logs:DescribeLogGroups

  • logs:DescribeLogStreams

  • logs:DescribeMetricFilters

  • logs:DescribeQueries

  • logs:DescribeSubscriptionFilters

  • logs:FilterLogEvents

  • logs:GetLogGroupFields

  • logs:GetLogRecord

  • logs:GetLogEvents

  • logs:GetQueryResults

  • logs:PutMetricFilter

  • logs:PutRetentionPolicy

  • logs:PutSubscriptionFilter

  • logs:StartQuery

  • logs:StopQuery

  • logs:TestMetricFilter

  • s3:CreateBucket

  • s3:ListBucket

  • sns:CreateTopic

  • sns:GetTopicAttributes

  • sns:ListSubscriptions

  • sns:ListTopics

  • sns:SetTopicAttributes

  • sns:Subscribe

  • sns:Unsubscribe

  • sqs:GetQueueAttributes

  • sqs:GetQueueUrl

  • sqs:ListQueues

  • sqs:SetQueueAttributes

  • swf:CreateAction

  • swf:DescribeAction

  • swf:ListActionTemplates

  • swf:RegisterAction

  • swf:RegisterDomain

  • swf:UpdateAction

Additionally, to view the service map in ServiceLens, you need AWSXrayReadOnlyAccess

AWS managed (predefined) policies for CloudWatch

AWS addresses many common use cases by providing standalone IAM policies that are created and administered by AWS. These AWS managed policies grant necessary permissions for common use cases so that you can avoid having to investigate what permissions are needed. For more information, see AWS managed policies in the IAM User Guide.

The following AWS managed policies, which you can attach to users in your account, are specific to CloudWatch.


You can review these permissions policies by signing in to the IAM console and searching for specific policies there.

You can also create your own custom IAM policies to allow permissions for CloudWatch actions and resources. You can attach these custom policies to the IAM users or groups that require those permissions.


The CloudWatchFullAccess policy grants full access to all CloudWatch actions and resources. Its contents are as follows:

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "autoscaling:Describe*", "cloudwatch:*", "logs:*", "ssm-incidents:ListResponsePlans", "sns:*", "iam:GetPolicy", "iam:GetPolicyVersion", "iam:GetRole" ], "Resource": "*" }, { "Effect": "Allow", "Action": "iam:CreateServiceLinkedRole", "Resource": "*", "Condition": { "StringLike": { "iam:AWSServiceName": [ "", "", "" ] } } } ] }


The CloudWatchActionsEC2Access policy grants read-only access to CloudWatch alarms and metrics in addition to Amazon EC2 metadata. It also grants access to the Stop, Terminate, and Reboot API actions for EC2 instances.


The CloudWatchReadOnlyAccess policy grants read-only access to CloudWatch.


The CloudWatch-CrossAccountAccess managed policy is used by the CloudWatch-CrossAccountSharingRole IAM role. This role and policy enable users of cross-account dashboards to view automatic dashboards in each account that is sharing dashboards.

The following the content of CloudWatchAutomaticDashboardsAccess:

{ "Version": "2012-10-17", "Statement": [ { "Action": [ "autoscaling:DescribeAutoScalingGroups", "cloudfront:GetDistribution", "cloudfront:ListDistributions", "dynamodb:DescribeTable", "dynamodb:ListTables", "ec2:DescribeInstances", "ec2:DescribeVolumes", "ecs:DescribeClusters", "ecs:DescribeContainerInstances", "ecs:ListClusters", "ecs:ListContainerInstances", "ecs:ListServices", "elasticache:DescribeCacheClusters", "elasticbeanstalk:DescribeEnvironments", "elasticfilesystem:DescribeFileSystems", "elasticloadbalancing:DescribeLoadBalancers", "kinesis:DescribeStream", "kinesis:ListStreams", "lambda:GetFunction", "lambda:ListFunctions", "rds:DescribeDBClusters", "rds:DescribeDBInstances", "resource-groups:ListGroupResources", "resource-groups:ListGroups", "route53:GetHealthCheck", "route53:ListHealthChecks", "s3:ListAllMyBuckets", "s3:ListBucket", "sns:ListTopics", "sqs:GetQueueAttributes", "sqs:GetQueueUrl", "sqs:ListQueues", "synthetics:DescribeCanariesLastRun", "tag:GetResources" ], "Effect": "Allow", "Resource": "*" }, { "Action": [ "apigateway:GET" ], "Effect": "Allow", "Resource": [ "arn:aws:apigateway:*::/restapis*" ] } ]

You can review these permissions policies by signing in to the IAM console and searching for specific policies there.

You can also create your own custom IAM policies to allow permissions for CloudWatch actions and resources. You can attach these custom policies to the IAM users or groups that require those permissions.

AWS managed (predefined) policies for CloudWatch Synthetics

The following AWS managed policies, which you can attach to users in your account, are specific to CloudWatch Synthetics:

  • CloudWatchSyntheticsFullAccess or CloudWatchSyntheticsReadOnlyAccess – To view canary details and the results of canary test runs.

  • AmazonS3ReadOnlyAccess and CloudWatchReadOnlyAccess – To be able to read all Synthetics data in the CloudWatch console.

  • AWSLambdaReadOnlyAccess – To be able to view the source code used by canaries.

  • CloudWatchSyntheticsFullAccess – Enables you to create canaries, Additionally, to create a canary that will have a new IAM role created for it, you also need the following inline policy statement:

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "iam:CreateRole", "iam:CreatePolicy", "iam:AttachRolePolicy" ], "Resource": [ "arn:aws:iam::*:role/service-role/CloudWatchSyntheticsRole*", "arn:aws:iam::*:policy/service-role/CloudWatchSyntheticsPolicy*" ] } ] }

    Granting a user the iam:CreateRole, iam:CreatePolicy, and iam:AttachRolePolicy permissions gives that user full administrative access to your AWS account. For example, a user with these permissions can create a policy that has full permissions for all resources, and attach that policy to any role. Be very careful about who you grant these permissions to.

    For information about attaching policies and granting permissions to users, see Changing Permissions for an IAM User and To embed an inline policy for a user or role.

AWS managed policy for AWS Systems Manager Incident Manager

The AWSCloudWatchAlarms_ActionSSMIncidentsServiceRolePolicy policy is attached to a service-linked role that allows CloudWatch to start incidents in AWS Systems Manager Incident Manager on your behalf. For more information, see Service-linked role permissions for CloudWatch alarms Systems Manager Incident Manager actions.

The policy has the following permission:

  • ssm-incidents:StartIncident

Customer managed policy examples

In this section, you can find example user policies that grant permissions for various CloudWatch actions. These policies work when you are using the CloudWatch API, AWS SDKs, or the AWS CLI.

Example 1: Allow user full access to CloudWatch

To grant a user full access to CloudWatch, you can use grant them the CloudWatchFullAccess managed policy instead of creating a customer-managed policy. The contents of the CloudWatchFullAccess are listed in CloudWatchFullAccess.

Example 2: Allow read-only access to CloudWatch

The following policy allows a user read-only access to CloudWatch and view Amazon EC2 Auto Scaling actions, CloudWatch metrics, CloudWatch Logs data, and alarm-related Amazon SNS data.

{ "Version": "2012-10-17", "Statement": [ { "Action": [ "autoscaling:Describe*", "cloudwatch:Describe*", "cloudwatch:Get*", "cloudwatch:List*", "logs:Get*", "logs:Describe*", "sns:Get*", "sns:List*" ], "Effect": "Allow", "Resource": "*" } ] }

Example 3: Stop or terminate an Amazon EC2 instance

The following policy allows an CloudWatch alarm action to stop or terminate an EC2 instance. In the sample below, the GetMetricData, ListMetrics, and DescribeAlarms actions are optional. It is recommended that you include these actions to ensure that you have correctly stopped or terminated the instance.

{ "Version": "2012-10-17", "Statement": [ { "Action": [ "cloudwatch:PutMetricAlarm", "cloudwatch:GetMetricData", "cloudwatch:ListMetrics", "cloudwatch:DescribeAlarms" ], "Sid": "00000000000000", "Resource": [ "*" ], "Effect": "Allow" }, { "Action": [ "ec2:DescribeInstanceStatus", "ec2:DescribeInstances", "ec2:StopInstances", "ec2:TerminateInstances" ], "Sid": "00000000000000", "Resource": [ "*" ], "Effect": "Allow" } ] }

CloudWatch updates to AWS managed policies

View details about updates to AWS managed policies for CloudWatch since this service began tracking these changes. For automatic alerts about changes to this page, subscribe to the RSS feed on the CloudWatch Document history page.

Change Description Date

AWSCloudWatchAlarms_ActionSSMIncidentsServiceRolePolicy – New managed policy

CloudWatch added a new managed IAM policy to allow CloudWatch to create incidents in AWS Systems Manager Incident Manager.

May 10, 2021

CloudWatchFullAccess – Update to an existing policy

CloudWatch changed the CloudWatchFullAccess managed policy. The following changes were made:

  • The ssm-incidents:ListResponsePlans permission was added to this policy to enable the a customer to retrieve their SSM Incident reponse plans.

  • The Resource allowed for the iam:CreateServiceLinkedRole permission was changed to * to enable CloudWatch to create multiple service-linked roles, including roles for EventBridge, SSM OpsItems, and SSM Incidents.

  • For iam:CreateServiceLinkedRole permission, the StringLike section was expanded to allow and so that CloudWatch can create service-linked roles necessary for alarms to create SSM Incidents.

May 10, 2021

CloudWatchAutomaticDashboardsAccess – Update to an existing policy

CloudWatch added a permission to the CloudWatchAutomaticDashboardsAccess managed policy. The synthetics:DescribeCanariesLastRun permission was added to this policy to enable cross-account dashboard users to see details about CloudWatch Synthetics canary runs.

April 20, 2021

CloudWatch started tracking changes

CloudWatch started tracking changes for its AWS managed policies.

April 14, 2021