

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 多模型端點安全
<a name="multi-model-endpoint-security"></a>

多模型端點中的模型和資料共同位於執行個體儲存磁碟區和容器記憶體中。Amazon SageMaker AI 端點的所有執行個體都會在您擁有的單一租用戶容器上執行。只有您的模型才能在您的多模型端點上執行。您有責任管理請求與模型的對應，並向使用者提供正確目標模型的存取權。SageMaker AI 使用 [IAM 角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) 來提供 IAM 身分型政策，您可用以指定允許或拒絕的動作與資源，以及在何種條件下允許或拒絕動作。

根據預設，具多模型端點 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_InvokeEndpoint.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_InvokeEndpoint.html) 許可的 IAM 主體可在 S3 字首位址 (定義於 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html) 操作) 調用任何模型，前提是操作所定義的 IAM 執行角色具下載模型的權限。如果您需要限制 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_InvokeEndpoint.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_InvokeEndpoint.html) 存取 S3 的一組有限模型，您可以執行下列其中一項操作：
+ 使用 `sagemaker:TargetModel` IAM 條件金鑰，限制 `InvokeEndpont` 呼叫為託管於端點的特定模型。例如，下列政策只有在 `TargetModel` 欄位的值符合其中一個指定常規表達式時，才能允許 `InvokeEndpont` 請求：

------
#### [ JSON ]

****  

  ```
  {
      "Version":"2012-10-17",		 	 	 
      "Statement": [
          {
              "Action": [
                  "sagemaker:InvokeEndpoint"
              ],
              "Effect": "Allow",
              "Resource":
              "arn:aws:sagemaker:{{us-east-1}}:{{111122223333}}:endpoint/{{endpoint_name}}",
              "Condition": {
                  "StringLike": {
                      "sagemaker:TargetModel": ["company_a/*", "common/*"]
                  }
              }
          }
      ]
  }
  ```

------

  如需 SageMaker AI 條件金鑰的相關資訊，請參閱《AWS Identity and Access Management 使用者指南》**的[適用 Amazon SageMaker AI 的條件金鑰](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonsagemaker.html#amazonsagemaker-policy-keys)。
+ 建立具有更多限制性 S3 字首的多模型端點。

如需詳細資訊了解 SageMaker AI 如何使用角色來管理對端點的存取權以及如何代表您執行作業，請參閱[如何使用 SageMaker AI 執行角色](sagemaker-roles.md)。客戶可能也有各自的合規要求所指定的某些資料隔離需求，這些需求可透過 IAM 身分達成。