开始使用 CloudWatch Database Insights - Amazon CloudWatch
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

开始使用 CloudWatch Database Insights

Amazon RDS 和 Aurora 数据库默认启用数据库洞察的标准模式。要开始使用 Database Insights 的高级模式,可以创建新数据库或修改数据库。

有关为 Amazon RDS 数据库启用数据库洞察的高级模式或标准模式的信息,请参阅以下主题。

有关为 Amazon Aurora 数据库启用 Database Insights 的高级模式或标准模式的信息,请参阅以下主题。

Database Insights 所需的权限

使用 Database Insights 需要某些 IAM 权限。Database Insights 需要 CloudWatch、CloudWatch Logs、Amazon RDS 和 Amazon RDS 性能详情的权限。如果您拥有更广泛的权限,则可能不需要向您的用户或角色提供这些权限。

使用 Database Insights 需要以下 CloudWatch 权限。

  • cloudwatch:BatchGetServiceLevelIndicatorReport

  • cloudwatch:DescribeAlarms

  • cloudwatch:GetDashboard

  • cloudwatch:GetMetricData

  • cloudwatch:ListMetrics

  • cloudwatch:PutDashboard

使用 Database Insights 需要以下 CloudWatch Logs 权限。

  • logs:DescribeLogGroups

  • logs:GetQueryResults

  • logs:StartQuery

  • logs:StopQuery

使用 Database Insights 需要以下 Amazon RDS 权限。

  • rds:DescribeDBClusters

  • rds:DescribeDBInstances

  • rds:DescribeEvents

  • rds:DescribeDBShardGroups(如果正在监控 Aurora PostgreSQL Limitless 数据库)

使用 Database Insights 需要以下性能洞察权限。

  • pi:ListAvailableResourceMetrics

  • pi:ListAvailableResourceDimensions

  • pi:DescribeDimensionKeys

  • pi:GetDimensionKeyDetails

  • pi:GetResourceMetrics

  • pi:ListPerformanceAnalysisReports

  • pi:GetResourceMetadata

  • pi:GetPerformanceAnalysisReport

  • pi:CreatePerformanceAnalysisReport

  • pi:DeletePerformanceAnalysisReport

  • pi:ListTagsForResource

  • pi:TagResource

  • pi:UntagResource

以下示例策略包含对 Database Insights 的完全访问所需的权限。

{ "Version": "2012-10-17", "Statement": [{ "Effect" : "Allow", "Action" : [ "cloudwatch:BatchGetServiceLevelIndicatorReport", "cloudwatch:DescribeAlarms", "cloudwatch:GetMetricStatistics", "cloudwatch:GetMetricData", "cloudwatch:ListMetrics", "cloudwatch:PutDashboard" ], "Resource" : "*" }, { "Effect" : "Allow", "Action" : [ "logs:DescribeLogGroups", "logs:GetQueryResults", "logs:StartQuery", "logs:StopQuery" ], "Resource" : "*" }, { "Effect" : "Allow", "Action" : [ "pi:DescribeDimensionKeys", "pi:GetDimensionKeyDetails", "pi:GetResourceMetadata", "pi:GetResourceMetrics", "pi:ListAvailableResourceDimensions", "pi:ListAvailableResourceMetrics", "pi:CreatePerformanceAnalysisReport", "pi:GetPerformanceAnalysisReport", "pi:ListPerformanceAnalysisReports", "pi:DeletePerformanceAnalysisReport", "pi:TagResource", "pi:UntagResource", "pi:ListTagsForResource" ], "Resource" : "arn:aws:pi:*:*:*/rds/*" }, { "Effect" : "Allow", "Action" : [ "rds:DescribeDBInstances", "rds:DescribeDBClusters", "rds:DescribeEvents" ], "Resource" : "*" } ] }