IAM policy - Amazon CloudWatch
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

IAM policy

To use CloudWatch Application Insights, you must create an Amazon Identity and Access Management (IAM) policy and attach it to your user, group, or role. For more information about users, groups, and roles, see IAM Identities (users, user groups, and roles). The IAM policy defines the user permissions.

To create an IAM policy using the console

To create an IAM policy using the IAM console, perform the following steps.

  1. Go to the IAM console. In the left navigation pane, select Policies.

  2. At the top of the page, select Create policy.

  3. Select the JSON tab.

  4. Copy and paste the following JSON document under the JSON tab.

    { "Version": "2012-10-17", "Statement": [ { "Action": [ "applicationinsights:*", "iam:CreateServiceLinkedRole", "iam:ListRoles", "resource-groups:ListGroups" ], "Effect": "Allow", "Resource": "*" } ] }
  5. Select Review Policy.

  6. Enter a Name for the policy, for example, “AppInsightsPolicy.” Optionally, enter a Description.

  7. Select Create Policy.

  8. In the left navigation pane, select User groups, Users, or Roles.

  9. Select the name of the user group, user, or role to which you would like to attach the policy.

  10. Select Add permissions.

  11. Select Attach existing policies directly.

  12. Search for the policy that you just created, and select the check box to the left of the policy name.

  13. Select Next: Review.

  14. Make sure that the correct policy is listed, and select Add permissions.

  15. Make sure that you log in with the user associated with the policy that you just created when you use CloudWatch Application Insights.

To create an IAM policy using the Amazon CLI

To create an IAM policy using the Amazon CLI, run the create-policy operation from the command line using the JSON document above as a file in your current folder.

To create an IAM policy using Amazon Tools for Windows PowerShell

To create an IAM policy using the Amazon Tools for Windows PowerShell, run the New-IAMPolicy cmdlt using the JSON document above as a file in your current folder.