Amazon适用于 的托管策略Amazon Systems Manager - Amazon Systems Manager
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 Amazon Web Services 服务入门

Amazon适用于 的托管策略Amazon Systems Manager

要向用户、组和角色添加权限,与自己编写策略相比,使用 Amazon 托管策略更简单。创建仅为团队提供所需权限的 IAM 客户托管策略需要时间和专业知识。要快速入门,您可以使用我们的 Amazon 托管式策略。这些策略涵盖常见使用案例,可在您的 Amazon Web Services 账户 中使用。有关 Amazon 托管式策略的更多信息,请参阅 IAM 用户指南中的Amazon 托管式策略

Amazon Web Services 负责维护和更新 Amazon 托管式策略。您无法更改 Amazon 托管式策略中的权限。服务偶尔会向 Amazon 托管式策略添加额外权限以支持新功能。此类更新会影响附加策略的所有身份(用户、组和角色)。当启动新功能或新操作可用时,服务最有可能会更新 Amazon 托管式策略。服务不会从 Amazon 托管式策略中删除权限,因此策略更新不会破坏您的现有权限。

此外,Amazon 还支持跨多种服务的工作职能的托管式策略。例如,ViewOnlyAccess Amazon 托管式策略提供对许多 Amazon Web Services 服务和资源的只读访问权限。当服务启动新功能时,Amazon会为新操作和资源添加只读权限。有关工作职能策略的列表和说明,请参阅 IAM 用户指南中的适用于工作职能的 Amazon 托管策略

Amazon 托管策略:AmazonSSMServiceRolePolicy

您不能将 AmazonSSMServiceRolePolicy 附加到自己的 Amazon Identity and Access Management (IAM) 实体。此附加到服务相关角色的策略允许 Amazon Systems Manager 代表您执行操作。有关更多信息,请参阅使用角色收集清单、运行维护时段任务和查看 OpsData:AWSServiceRoleForAmazonSSM

以下三个 Systems Manager 功能使用服务相关角色:

  • Inventory (清单) 功能需要服务相关角色。该角色允许系统收集标签和 Resource Groups 中的清单元数据。

  • Maintenance Windows 功能可以有选择性地使用服务相关角色。使用该角色,Maintenance Windows 服务可在目标托管式节点上运行维护任务。请注意,Systems Manager 的服务相关角色未提供所有场景需要的权限。有关更多信息,请参阅我应该使用服务相关角色还是自定义服务角色来运行维护时段任务?

  • Explorer 功能使用服务相关角色,允许从多个账户查看 OpsData 和 OpsItems。当您启用 Security Hub 作为 Explorer 或 OpsCenter 的数据源时,此服务相关角色还允许 Explorer 创建托管规则。

权限详细信息

除非另有说明,否则 AWSServiceRoleForAmazonSSM 服务相关角色权限策略允许 Systems Manager 对所有相关资源 ("Resource": "*") 完成以下操作:

  • ssm:CancelCommand

  • ssm:GetCommandInvocation

  • ssm:ListCommandInvocations

  • ssm:ListCommands

  • ssm:SendCommand

  • ssm:GetAutomationExecution

  • ssm:GetParameters

  • ssm:StartAutomationExecution

  • ssm:ListTagsForResource

  • ssm:GetCalendarState

  • ssm:UpdateServiceSetting [1]

  • ssm:GetServiceSetting [1]

  • ec2:DescribeInstanceAttribute

  • ec2:DescribeInstanceStatus

  • ec2:DescribeInstances

  • lambda:InvokeFunction [2]

  • states:DescribeExecution [3]

  • states:StartExecution [3]

  • resource-groups:ListGroups

  • resource-groups:ListGroupResources

  • resource-groups:GetGroupQuery

  • tag:GetResources

  • config:SelectResourceConfig

  • config:DescribeComplianceByConfigRule

  • config:DescribeComplianceByResource

  • config:DescribeRemediationConfigurations

  • config:DescribeConfigurationRecorders

  • compute-optimizer:GetEC2InstanceRecommendations

  • compute-optimizer:GetEnrollmentStatus

  • support:DescribeTrustedAdvisorChecks

  • support:DescribeTrustedAdvisorCheckSummaries

  • support:DescribeTrustedAdvisorCheckResult

  • support:DescribeCases

  • iam:PassRole [4]

  • cloudformation:DescribeStacks

  • cloudformation:ListStackResources

  • cloudformation:ListStackInstances [5]

  • cloudformation:DescribeStackSetOperation [5]

  • cloudformation:DeleteStackSet [5]

  • cloudformation:DeleteStackInstances [6]

  • events:PutRule [7]

  • events:PutTargets [7]

  • events:RemoveTargets [8]

  • events:DeleteRule [8]

  • events:DescribeRule

  • securityhub:DescribeHub

[1] 仅允许对以下资源执行 ssm:UpdateServiceSettingssm:GetServiceSetting 操作的权限。

arn:aws:ssm:*:*:servicesetting/ssm/opsitem/* arn:aws:ssm:*:*:servicesetting/ssm/opsdata/*

[2] 仅允许对以下资源执行 lambda:InvokeFunction 操作的权限。

arn:aws:lambda:*:*:function:SSM* arn:aws:lambda:*:*:function:*:SSM*

[3] 仅允许对以下资源执行 states: 操作的权限。

arn:aws:states:*:*:stateMachine:SSM* arn:aws:states:*:*:execution:SSM*

[4] 根据 Systems Manager 服务的以下条件,仅允许执行 iam:PassRole 操作的权限。

"Condition": { "StringEquals": { "iam:PassedToService": [ "ssm.amazonaws.com" ] } }

[5] 仅允许对以下资源执行 cloudformation:ListStackInstancescloudformation:DescribeStackSetOperationcloudformation:DeleteStackSet 操作的权限。

arn:aws:cloudformation:*:*:stackset/AWS-QuickSetup-SSM*:*

[6] 仅允许对以下资源执行 cloudformation:DeleteStackInstances 操作的权限。

arn:aws:cloudformation:*:*:stackset/AWS-QuickSetup-SSM*:* arn:aws:cloudformation:*:*:stackset-target/AWS-QuickSetup-SSM*:* arn:aws:cloudformation:*:*:type/resource/*

[7] 根据 Systems Manager 服务的以下条件,仅允许执行 events:PutRuleevents:PutTargets 操作的权限。

"Condition": { "StringEquals": { "events:ManagedBy": "ssm.amazonaws.com" } }

[8] 仅允许对以下资源执行 events:RemoveTargetsevents:DeleteRule 操作的权限。

arn:aws:events:*:*:rule/SSMExplorerManagedRule

完整 AmazonSSMServiceRolePolicy 策略

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ssm:CancelCommand", "ssm:GetCommandInvocation", "ssm:ListCommandInvocations", "ssm:ListCommands", "ssm:SendCommand", "ssm:GetAutomationExecution", "ssm:GetParameters", "ssm:StartAutomationExecution", "ssm:ListTagsForResource", "ssm:GetCalendarState" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "ssm:UpdateServiceSetting", "ssm:GetServiceSetting" ], "Resource": [ "arn:aws:ssm:*:*:servicesetting/ssm/opsitem/*", "arn:aws:ssm:*:*:servicesetting/ssm/opsdata/*" ] }, { "Effect": "Allow", "Action": [ "ec2:DescribeInstanceAttribute", "ec2:DescribeInstanceStatus", "ec2:DescribeInstances" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "lambda:InvokeFunction" ], "Resource": [ "arn:aws:lambda:*:*:function:SSM*", "arn:aws:lambda:*:*:function:*:SSM*" ] }, { "Effect": "Allow", "Action": [ "states:DescribeExecution", "states:StartExecution" ], "Resource": [ "arn:aws:states:*:*:stateMachine:SSM*", "arn:aws:states:*:*:execution:SSM*" ] }, { "Effect": "Allow", "Action": [ "resource-groups:ListGroups", "resource-groups:ListGroupResources", "resource-groups:GetGroupQuery" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "cloudformation:DescribeStacks", "cloudformation:ListStackResources" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "tag:GetResources" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "config:SelectResourceConfig" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "compute-optimizer:GetEC2InstanceRecommendations", "compute-optimizer:GetEnrollmentStatus" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "support:DescribeTrustedAdvisorChecks", "support:DescribeTrustedAdvisorCheckSummaries", "support:DescribeTrustedAdvisorCheckResult", "support:DescribeCases" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "config:DescribeComplianceByConfigRule", "config:DescribeComplianceByResource", "config:DescribeRemediationConfigurations", "config:DescribeConfigurationRecorders" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": "iam:PassRole", "Resource": "*", "Condition": { "StringEquals": { "iam:PassedToService": [ "ssm.amazonaws.com" ] } } }, { "Effect": "Allow", "Action": "organizations:DescribeOrganization", "Resource": "*" }, { "Effect": "Allow", "Action": "cloudformation:ListStackSets", "Resource": "*" }, { "Effect": "Allow", "Action": [ "cloudformation:ListStackInstances", "cloudformation:DescribeStackSetOperation", "cloudformation:DeleteStackSet" ], "Resource": "arn:aws:cloudformation:*:*:stackset/AWS-QuickSetup-SSM*:*" }, { "Effect": "Allow", "Action": "cloudformation:DeleteStackInstances", "Resource": [ "arn:aws:cloudformation:*:*:stackset/AWS-QuickSetup-SSM*:*", "arn:aws:cloudformation:*:*:stackset-target/AWS-QuickSetup-SSM*:*", "arn:aws:cloudformation:*:*:type/resource/*" ] }, { "Effect": "Allow", "Action": [ "events:PutRule", "events:PutTargets" ], "Resource": "*", "Condition": { "StringEquals": { "events:ManagedBy": "ssm.amazonaws.com" } } }, { "Effect": "Allow", "Action": [ "events:RemoveTargets", "events:DeleteRule" ], "Resource": [ "arn:aws:events:*:*:rule/SSMExplorerManagedRule" ] }, { "Effect": "Allow", "Action": "events:DescribeRule", "Resource": "*" }, { "Effect": "Allow", "Action": "securityhub:DescribeHub", "Resource": "*" } ] }

AmazonSSMReadOnlyAccess

使用 AmazonSSMReadOnlyAccess Amazon 托管式策略来允许对 Amazon Systems Manager 资源的只读权限。将此策略分配给 Amazon Identity and Access Management (IAM) 用户允许只读 API 操作,例如 Describe*Get*List*。有关此策略支持的操作的完整列表,请查看此 policy(策略)。

服务级别权限

此托管策略提供对 Systems Manager 源的只读访问权限。此策略中不包含其他服务权限。

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

Amazon托管策略:AWSSystemsManagerOpsDataSyncServiceRolePolicy

您不能将 AWSSystemsManagerOpsDataSyncServiceRolePolicy 附加到自己的 IAM 实体。此附加到服务相关角色的策略允许 Systems Manager 代表您执行操作。有关更多信息,请参阅使用角色为 Systems Manager Explorer 创建 OpsData 和 OpsItems:AWSServiceRoleForSystemsManagerOpsDataSync

AWSSystemsManagerOpsDataSyncServiceRolePolicy 允许 服务相关角色创建和更新来自 Amazon Security Hub 调查结果的 OpsItems 及 OpsData。

权限详细信息

除非另有说明,否则 AWSServiceRoleForSystemsManagerOpsDataSync 服务相关角色权限策略允许 Systems Manager 对所有相关资源 ("Resource": "*") 完成以下操作:

  • ssm:GetOpsItem [1]

  • ssm:UpdateOpsItem [1]

  • ssm:CreateOpsItem

  • ssm:AddTagsToResource [2]

  • ssm:UpdateServiceSetting [3]

  • ssm:GetServiceSetting [3]

  • securityhub:GetFindings

  • securityhub:GetFindings

  • securityhub:BatchUpdateFindings [4]

[1] 根据 Systems Manager 服务的以下条件,仅允许执行 ssm:GetOpsItemssm:UpdateOpsItem 操作的权限。

"Condition": { "StringEquals": { "aws:ResourceTag/ExplorerSecurityHubOpsItem": "true" } }

[2] 仅允许对以下资源执行 ssm:AddTagsToResource 操作的权限。

arn:aws:ssm:*:*:opsitem/*

[3] 仅允许对以下资源执行 ssm:UpdateServiceSettingssm:GetServiceSetting 操作的权限。

arn:aws:ssm:*:*:servicesetting/ssm/opsitem/* arn:aws:ssm:*:*:servicesetting/ssm/opsdata/*

[4] 根据 Systems Manager 服务的以下条件,拒绝执行 securityhub:BatchUpdateFindings 的权限。

"Condition": { "StringEquals": { "securityhub:ASFFSyntaxPath/Workflow.Status": "SUPPRESSED" }, "Null": { "securityhub:ASFFSyntaxPath/Confidence": false, "securityhub:ASFFSyntaxPath/Criticality": false, "securityhub:ASFFSyntaxPath/Note": false, "securityhub:ASFFSyntaxPath/RelatedFindings": false, "securityhub:ASFFSyntaxPath/Types": false, "securityhub:ASFFSyntaxPath/UserDefinedFields": false, "securityhub:ASFFSyntaxPath/VerificationState": false } }

完整 AWSSystemsManagerOpsDataSyncServiceRolePolicy 策略

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ssm:GetOpsItem", "ssm:UpdateOpsItem" ], "Resource": "*", "Condition": { "StringEquals": { "aws:ResourceTag/ExplorerSecurityHubOpsItem": "true" } } }, { "Effect": "Allow", "Action": [ "ssm:CreateOpsItem" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "ssm:AddTagsToResource" ], "Resource": "arn:aws:ssm:*:*:opsitem/*" }, { "Effect": "Allow", "Action": [ "ssm:UpdateServiceSetting", "ssm:GetServiceSetting" ], "Resource": [ "arn:aws:ssm:*:*:servicesetting/ssm/opsitem/*", "arn:aws:ssm:*:*:servicesetting/ssm/opsdata/*" ] }, { "Effect": "Allow", "Action": [ "securityhub:GetFindings", "securityhub:BatchUpdateFindings" ], "Resource": [ "*" ] }, { "Effect": "Deny", "Action": "securityhub:BatchUpdateFindings", "Resource": "*", "Condition": { "StringEquals": { "securityhub:ASFFSyntaxPath/Workflow.Status": "SUPPRESSED" }, "Null": { "securityhub:ASFFSyntaxPath/Confidence": false, "securityhub:ASFFSyntaxPath/Criticality": false, "securityhub:ASFFSyntaxPath/Note": false, "securityhub:ASFFSyntaxPath/RelatedFindings": false, "securityhub:ASFFSyntaxPath/Types": false, "securityhub:ASFFSyntaxPath/UserDefinedFields": false, "securityhub:ASFFSyntaxPath/VerificationState": false } } } ] }

对 Amazon 托管式策略的 Systems Manager 更新

查看有关 Systems Manager 的 Amazon 托管式策略更新的详细信息(从该服务开始跟踪这些更改开始)。要获得有关此页面更改的自动提示,请订阅 Systems Manager 文档历史记录 页面上的 RSS 馈送。

更改 说明 日期

AmazonSSMServiceRolePolicy – 对现有策略的更新。

Systems Manager 添加了新的权限,允许 Explorer 在您从 Explorer 或 OpsCenter 启用 Security Hub 时创建托管规则。添加了新的权限,以便在允许 OpsData 之前检查 config 和 compute-optimizer 是否满足必需的要求。

2021 年 4 月 27 日

AWSSystemsManagerOpsDataSyncServiceRolePolicy – 新策略。

Systems Manager 添加了新的策略,用于从 Explorer 和 OpsCenter 中的 Security Hub 调查结果创建并更新 OpsItems 及 OpsData。

2021 年 4 月 27 日

AmazonSSMServiceRolePolicy – 对现有策略的更新。

Systems Manager 添加了新的权限,允许在 Explorer 中查看多个账户和 Amazon Web Services 区域的聚合 OpsData 及 OpsItems 详细信息。

2021 年 3 月 24 日

Systems Manager 已开启跟踪更改

Systems Manager 为其 Amazon 托管式策略开启了跟踪更改。

2021 年 3 月 12 日