IAM policy - Amazon CloudWatch

IAM policy

To use CloudWatch Application Insights for .NET and SQL Server, you must create an Identity and Access Management (IAM) policy and attach it to your IAM user identity. The IAM policy defines the user permissions.

To create an IAM policy using the console

To create an IAM policy using the IAM console, follow these 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" ], "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. Select Users from the left navigation pane.

  9. Select the User name of the user 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 for .NET and SQL Server.

To create an IAM policy using the AWS CLI

To create an IAM policy using the AWS 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 AWS Tools for Windows PowerShell

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