

• Amazon Systems Manager CloudWatch 控制面板在 2026 年 4 月 30 日之后将不再可用。客户可以像现在一样继续使用 Amazon CloudWatch 控制台来查看、创建和管理其 Amazon CloudWatch 控制面板。有关更多信息，请参阅 [Amazon CloudWatch 控制面板文档](https://docs.amazonaws.cn/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)。

# 自动化代入角色
<a name="cloud-connector-automation-assume-role"></a>

自动化代入角色是 Automation 在使运行手册（以托管节点形式载入 Azure 虚拟机）运行时所代入的角色。该角色可调用混合激活所需的核心 Systems Manager API。还可以将服务角色传递给 Systems Manager，并代入 Azure 联合身份验证角色以获取 Azure 凭证。

**角色名称模式：**`SSM-AzureAssumeRole-{{connector-name}}-{{id8}}`

该信任策略允许 Systems Manager 服务主体代入该角色，其范围仅限于您的 Amazon Web Services 账户。将 `123456789012` 替换为您的 Amazon Web Services 账户 ID。

```
{
    "Version": "2012-10-17", 		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "sts:AssumeRole",
            "Principal": {
                "Service": "ssm.amazonaws.com"
            },
            "Condition": {
                "StringEquals": {
                    "aws:SourceAccount": "123456789012"
                }
            }
        }
    ]
}
```

该权限策略授予 Automation 执行载入运行手册所需的操作。将 `123456789012` 替换为您的 Amazon Web Services 账户 ID、`us-east-1` 替换为创建云连接器的 Amazon Web Services 区域、`SSM-AzureRole-MyConnector-a1b2c3d4` 替换为 Azure 联合身份验证角色的名称、`AmazonEC2RunCommandRoleForManagedInstances` 替换为附加到云连接器的托管实例角色的名称，`connector-id` 替换为云连接器的 ID。

**权限详细信息**

该策略包含以下权限。
+ `ssm`：可以使 Automation 创建、删除和描述混合激活（`CreateActivation`、`DeleteActivation`、`DescribeActivations`）；将 Azure 虚拟机注册为托管节点并读取其状态（`DescribeInstanceInformation`）；标记激活及托管实例（`AddTagsToResource`）；读取安装运行手册（在 `AWS-InstallSSMAgentOnAzure` 上执行 `GetDocument`）；以及读取云连接器配置（`GetCloudConnector`）。
+ `iam:PassRole`：在注册 Azure 虚拟机时允许 Automation 将托管实例角色传递给 Systems Manager。`iam:PassedToService` 条件将传递对象限制为 `ssm.amazonaws.com`。
+ `iam:ListRoleTags`：可以使 Automation 在代入该角色前读取 Azure 联合身份验证角色上的标签，以确认其属于同一个云连接器。
+ `sts:AssumeRole`：可以使 Automation 代入 Azure 联合身份验证角色以获取 Azure 凭证。

```
{
    "Version": "2012-10-17", 		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "sts:AssumeRole",
            "Resource": "arn:aws:iam::123456789012:role/service-role/SSM-AzureRole-MyConnector-a1b2c3d4"
        },
        {
            "Effect": "Allow",
            "Action": "iam:PassRole",
            "Resource": "arn:aws:iam::123456789012:role/service-role/AmazonEC2RunCommandRoleForManagedInstances",
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": "ssm.amazonaws.com"
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "ssm:CreateActivation",
                "ssm:DeleteActivation",
                "ssm:DescribeActivations",
                "ssm:DescribeInstanceInformation",
                "iam:ListRoleTags",
                "ssm:AddTagsToResource"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": "ssm:GetDocument",
            "Resource": [
                "arn:aws:ssm:us-east-1:*:document/AWS-InstallSSMAgentOnAzure"
            ]
        },
        {
            "Effect": "Allow",
            "Action": "ssm:GetCloudConnector",
            "Resource": "arn:aws:ssm:us-east-1:123456789012:cloud-connector/connector-id"
        }
    ]
}
```