为即时节点访问创建自动审批策略 - Amazon Systems Manager
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

Amazon Systems Manager Change Manager 不再向新客户开放。现有客户可以继续正常使用该服务。有关更多信息,请参阅 Amazon Systems Manager Change Manager 可用性变更

为即时节点访问创建自动审批策略

自动审批策略使用 Cedar 策略语言来定义哪些用户无需手动审批即可自动连接到指定节点。自动审批策略包含多个指定 principalresourcepermit 语句。每个语句都包含一个定义自动审批条件的 when 子句。

以下是示例自动审批策略。

permit ( principal in AWS::IdentityStore::Group::"e8c17310-e011-7089-d989-10da1EXAMPLE", action == AWS::SSM::Action::"getTokenForInstanceAccess", resource ) when { principal has costCenter && resource.hasTag("CostCenter") && principal.costCenter == resource.getTag("CostCenter") }; permit ( principal in AWS::IdentityStore::Group::"d4q81745-r081-7079-d789-14da1EXAMPLE", action == AWS::SSM::Action::"getTokenForInstanceAccess", resource ) when { principal has organization && resource.hasTag("Engineering") && resource.hasTag("Production") && principal.organization == "Platform" }; permit ( principal, action == AWS::SSM::Action::"getTokenForInstanceAccess", resource ) when { principal has employeeNumber && principal.employeeNumber like "E-1*" && resource.hasTag("Purpose") && resource.getTag("Purpose") == "Testing" };

以下过程说明了如何创建即时节点访问的自动审批策略。自动审批批准的访问请求的访问持续时间为 1 小时。此值不能更改。每个 Amazon Web Services 账户 和 Amazon Web Services 区域 只能有一个自动审批策略。有关如何构造策略语句的信息,请参阅自动审批和拒绝访问策略的语句结构和内置运算符

创建自动审批策略
  1. 访问 https://console.aws.amazon.com/systems-manager/,打开 Amazon Systems Manager 控制台。

  2. 在导航窗格中选择管理节点访问

  3. 审批策略选项卡中,选择创建自动审批策略

  4. 策略语句部分输入自动审批策略的策略语句。您可以使用提供的示例语句来帮助您创建策略。

  5. 选择创建自动审批策略