

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# AWS Identity and Access Management 适用于亚马逊 A SageMaker I
<a name="security-iam"></a>

AWS Identity and Access Management (IAM) AWS 服务 可帮助管理员安全地控制对 AWS 资源的访问权限。IAM 管理员控制谁可以*进行身份验证*（登录）和*授权（有权*限）使用 SageMaker AI 资源。您可以使用 IAM AWS 服务 ，无需支付额外费用。

**Topics**
+ [受众](#security_iam_audience)
+ [使用身份进行身份验证](#security_iam_authentication)
+ [使用策略管理访问](#security_iam_access-manage)
+ [Amazon A SageMaker I 如何与 IAM 配合使用](security_iam_service-with-iam.md)
+ [亚马逊 SageMaker AI 基于身份的策略示例](security_iam_id-based-policy-examples.md)
+ [防止跨服务混淆代理](security-confused-deputy-prevention.md)
+ [如何使用 SageMaker AI 执行角色](sagemaker-roles.md)
+ [Amazon SageMaker 角色管理器](role-manager.md)
+ [笔记本的访问控制](security-access-control.md)
+ [Amazon SageMaker AI API 权限：操作、权限和资源参考](api-permissions-reference.md)
+ [AWS 亚马逊 A SageMaker I 的托管策略](security-iam-awsmanpol.md)
+ [对 Amazon SageMaker AI 身份和访问进行故障排除](security_iam_troubleshoot.md)

## 受众
<a name="security_iam_audience"></a>

您的使用方式 AWS Identity and Access Management (IAM) 因您的角色而异：
+ **服务用户**：如果您无法访问功能，请从管理员处请求权限（请参阅[对 Amazon SageMaker AI 身份和访问进行故障排除](security_iam_troubleshoot.md)）
+ **服务管理员**：确定用户访问权限并提交权限请求（请参阅[Amazon A SageMaker I 如何与 IAM 配合使用](security_iam_service-with-iam.md)）
+ **IAM 管理员**：编写用于管理访问权限的策略（请参阅[亚马逊 SageMaker AI 基于身份的策略示例](security_iam_id-based-policy-examples.md)）

## 使用身份进行身份验证
<a name="security_iam_authentication"></a>

身份验证是您 AWS 使用身份凭证登录的方式。您必须以 IAM 用户身份进行身份验证 AWS 账户根用户，或者通过担任 IAM 角色进行身份验证。

您可以使用来自身份源的证书 AWS IAM Identity Center （例如（IAM Identity Center）、单点登录身份验证或 Google/Facebook 证书，以联合身份登录。有关登录的更多信息，请参阅《AWS 登录 用户指南》**中的[如何登录您的 AWS 账户](https://docs.aws.amazon.com/signin/latest/userguide/how-to-sign-in.html)。

对于编程访问， AWS 提供 SDK 和 CLI 来对请求进行加密签名。有关更多信息，请参阅*《IAM 用户指南》*中的[适用于 API 请求的AWS 签名版本 4](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html)。

### AWS 账户 root 用户
<a name="security_iam_authentication-rootuser"></a>

 创建时 AWS 账户，首先会有一个名为 AWS 账户 *root 用户的*登录身份，该身份可以完全访问所有资源 AWS 服务 和资源。我们强烈建议不要使用根用户进行日常任务。有关需要根用户凭证的任务，请参阅《IAM 用户指南》**中的[需要根用户凭证的任务](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#root-user-tasks)。

### 联合身份
<a name="security_iam_authentication-federated"></a>

作为最佳实践，要求人类用户使用与身份提供商的联合身份验证才能 AWS 服务 使用临时证书进行访问。

*联合身份是指*来自您的企业目录、Web 身份提供商的用户 Directory Service ，或者 AWS 服务 使用来自身份源的凭据进行访问的用户。联合身份代入可提供临时凭证的角色。

要集中管理访问权限，建议使用。 AWS IAM Identity Center有关更多信息，请参阅《AWS IAM Identity Center 用户指南》**中的[什么是 IAM Identity Center？](https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html)。

### IAM 用户和群组
<a name="security_iam_authentication-iamuser"></a>

*[IAM 用户](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html)*是对某个人员或应用程序具有特定权限的一个身份。建议使用临时凭证，而非具有长期凭证的 IAM 用户。有关更多信息，请参阅 *IAM 用户指南*[中的要求人类用户使用身份提供商的联合身份验证才能 AWS 使用临时证书进行访问](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#bp-users-federation-idp)。

[https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html)指定一组 IAM 用户，便于更轻松地对大量用户进行权限管理。有关更多信息，请参阅*《IAM 用户指南》*中的 [IAM 用户使用案例](https://docs.aws.amazon.com/IAM/latest/UserGuide/gs-identities-iam-users.html)。

### IAM 角色
<a name="security_iam_authentication-iamrole"></a>

*[IAM 角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)*是具有特定权限的身份，可提供临时凭证。您可以通过[从用户切换到 IAM 角色（控制台）](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-console.html)或调用 AWS CLI 或 AWS API 操作来代入角色。有关更多信息，请参阅《IAM 用户指南》**中的[担任角色的方法](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage-assume.html)。

IAM 角色对于联合用户访问、临时 IAM 用户权限、跨账户访问、跨服务访问以及在 Amazon EC2 上运行的应用程序非常有用。有关更多信息，请参阅《IAM 用户指南》**中的 [IAM 中的跨账户资源访问](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html)。

## 使用策略管理访问
<a name="security_iam_access-manage"></a>

您可以 AWS 通过创建策略并将其附加到 AWS 身份或资源来控制中的访问权限。策略定义了与身份或资源关联时的权限。 AWS 在委托人提出请求时评估这些政策。大多数策略都以 JSON 文档的 AWS 形式存储在中。有关 JSON 策略文档的更多信息，请参阅*《IAM 用户指南》*中的 [JSON 策略概述](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policies-json)。

管理员使用策略，通过定义哪个**主体**可以在什么**条件**下对哪些**资源**执行哪些**操作**来指定谁有权访问什么。

默认情况下，用户和角色没有权限。IAM 管理员创建 IAM 策略并将其添加到角色中，然后用户可以担任这些角色。IAM 策略定义权限，与执行操作所用的方法无关。

### 基于身份的策略
<a name="security_iam_access-manage-id-based-policies"></a>

基于身份的策略是您附加到身份（用户、组或角色）的 JSON 权限策略文档。这些策略控制身份可以执行什么操作、对哪些资源执行以及在什么条件下执行。要了解如何创建基于身份的策略，请参阅《IAM 用户指南》**中的[使用客户管理型策略定义自定义 IAM 权限](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html)。

基于身份的策略可以是*内联策略*（直接嵌入到单个身份中）或*托管策略*（附加到多个身份的独立策略）。要了解如何在托管策略和内联策略之间进行选择，请参阅*《IAM 用户指南》*中的[在托管策略与内联策略之间进行选择](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-choosing-managed-or-inline.html)。

### 基于资源的策略
<a name="security_iam_access-manage-resource-based-policies"></a>

基于资源的策略是附加到资源的 JSON 策略文档。示例包括 IAM *角色信任策略*和 Amazon S3 *存储桶策略*。在支持基于资源的策略的服务中，服务管理员可以使用它们来控制对特定资源的访问。您必须在基于资源的策略中[指定主体](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html)。

基于资源的策略是位于该服务中的内联策略。您不能在基于资源的策略中使用 IAM 中的 AWS 托管策略。

### 访问控制列表 (ACLs)
<a name="security_iam_access-manage-acl"></a>

访问控制列表 (ACLs) 控制哪些委托人（账户成员、用户或角色）有权访问资源。 ACLs 与基于资源的策略类似，尽管它们不使用 JSON 策略文档格式。

Amazon S3 和 Amazon VPC 就是支持的服务示例 ACLs。 AWS WAF要了解更多信息 ACLs，请参阅《*亚马逊简单存储服务开发者指南*》中的[访问控制列表 (ACL) 概述](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html)。

### 其他策略类型
<a name="security_iam_access-manage-other-policies"></a>

AWS 支持其他策略类型，这些策略类型可以设置更常见的策略类型授予的最大权限：
+ **权限边界** – 设置基于身份的策略可以授予 IAM 实体的最大权限。有关更多信息，请参阅《 IAM 用户指南》**中的 [IAM 实体的权限边界](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html)。
+ **服务控制策略 (SCPs)**-在中指定组织或组织单位的最大权限 AWS Organizations。有关更多信息，请参阅《AWS Organizations 用户指南》**中的[服务控制策略](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html)。
+ **资源控制策略 (RCPs)**-设置账户中资源的最大可用权限。有关更多信息，请参阅《*AWS Organizations 用户指南》*中的[资源控制策略 (RCPs)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html)。
+ **会话策略** – 在为角色或联合用户创建临时会话时，作为参数传递的高级策略。有关更多信息，请参阅《IAM 用户指南》**中的[会话策略](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)。

### 多个策略类型
<a name="security_iam_access-manage-multiple-policies"></a>

当多个类型的策略应用于一个请求时，生成的权限更加复杂和难以理解。要了解在涉及多种策略类型时如何 AWS 确定是否允许请求，请参阅 *IAM 用户指南*中的[策略评估逻辑](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html)。

# Amazon A SageMaker I 如何与 IAM 配合使用
<a name="security_iam_service-with-iam"></a>

**重要**  
允许 Amazon SageMaker Studio 或 Amazon SageMaker Studio Classic 创建亚马逊 SageMaker资源的自定义 IAM 策略还必须授予向这些资源添加标签的权限。之所以需要为资源添加标签的权限，是因为 Studio 和 Studio Classic 会自动为创建的任何资源添加标签。如果 IAM 策略允许 Studio 和 Studio Classic 创建资源但不允许标记，则在尝试创建资源时可能会出现 AccessDenied “” 错误。有关更多信息，请参阅 [提供标记 A SageMaker I 资源的权限](security_iam_id-based-policy-examples.md#grant-tagging-permissions)。  
[AWS 亚马逊 A SageMaker I 的托管策略](security-iam-awsmanpol.md)授予创建 SageMaker 资源的权限已经包括在创建这些资源时添加标签的权限。

在使用 IAM 管理对 A SageMaker I 的访问权限之前，您应该了解哪些可用于 A SageMaker I 的 IAM 功能。要全面了解 A SageMaker I 和其他 AWS 服务如何与 IAM 配合使用，请参阅《[AWS 服务授权参考》中的 “与 IAM 配合](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_aws-services-that-work-with-iam.html)*使用的服务*”。

**Topics**
+ [适用于 Amazon AI 的基于身份的政策 SageMaker](#security_iam_service-with-iam-id-based-policies)
+ [Amazon A SageMaker I 内部基于资源的政策](#security_iam_service-with-iam-resource-based-policies)
+ [亚马逊 A SageMaker I 的政策行动](#security_iam_service-with-iam-id-based-policies-actions)
+ [Amazon A SageMaker I 的政策资源](#security_iam_service-with-iam-id-based-policies-resources)
+ [亚马逊 A SageMaker I 的策略条件密钥](#security_iam_service-with-iam-id-based-policies-conditionkeys)
+ [基于 SageMaker AI 标签的授权](#security_iam_service-with-iam-tags)
+ [SageMaker AI IAM 角色](#security_iam_service-with-iam-roles)

## 适用于 Amazon AI 的基于身份的政策 SageMaker
<a name="security_iam_service-with-iam-id-based-policies"></a>

通过使用 IAM 基于身份的策略，您可以指定允许或拒绝的操作和资源以及允许或拒绝操作的条件。 SageMaker AI 支持特定的操作、资源和条件键。要了解 JSON 策略中使用的所有元素，请参阅*服务授权参考*中的 [IAM JSON 策略元素参考](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_elements.html)。

## Amazon A SageMaker I 内部基于资源的政策
<a name="security_iam_service-with-iam-resource-based-policies"></a>

**支持基于资源的策略：**否 

基于资源的策略是附加到资源的 JSON 策略文档。基于资源的策略的示例包括 IAM *角色信任策略*和 Amazon S3 *存储桶策略*。在支持基于资源的策略的服务中，服务管理员可以使用它们来控制对特定资源的访问。对于在其中附加策略的资源，策略定义指定主体可以对该资源执行哪些操作以及在什么条件下执行。您必须在基于资源的策略中[指定主体](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html)。委托人可以包括账户、用户、角色、联合用户或 AWS 服务。

要启用跨账户访问，您可以将整个账户或其他账户中的 IAM 实体指定为基于资源的策略中的主体。将跨账户委托人添加到基于资源的策略只是建立信任关系工作的一半而已。当主体和资源位于不同的 AWS 账户中时，受信任账户中的 IAM 管理员还必须授予主体实体（用户或角色）访问资源的权限。他们通过将基于身份的策略附加到实体以授予权限。但是，如果基于资源的策略向同一个账户中的主体授予访问权限，则不需要额外的基于身份的策略。有关更多信息，请参阅*《IAM 用户指南》*中的 [IAM 中的跨账户资源访问](https://docs.aws.amazon.com//IAM/latest/UserGuide/access_policies-cross-account-resource-access.html)。

**注意**  
[AWS Resource Access Manager](https://docs.aws.amazon.com/ram/latest/userguide/what-is.html)用于安全共享支持的 SageMaker AI 资源。要查找可共享资源列表，请参阅可[共享的 Amazon A SageMaker I](https://docs.aws.amazon.com/ram/latest/userguide/shareable.html#shareable-sagemaker) 资源。

## 亚马逊 A SageMaker I 的政策行动
<a name="security_iam_service-with-iam-id-based-policies-actions"></a>

管理员可以使用 AWS JSON 策略来指定谁有权访问什么。也就是说，哪个**主体**可以对什么**资源**执行**操作**，以及在什么**条件**下执行。

JSON 策略的 `Action` 元素描述可用于在策略中允许或拒绝访问的操作。在策略中包含操作以授予执行关联操作的权限。

 SageMaker AI 中的策略操作在操作前使用以下前缀:`sagemaker:`. 例如，要授予某人使用 SageMaker A `CreateTrainingJob` I API 操作运行 A SageMaker I 训练作业的权限，您需要将该`sagemaker:CreateTrainingJob`操作包含在他们的策略中。策略声明必须包含`Action`或`NotAction`元素。 SageMaker AI 定义了自己的一组操作，这些操作描述了您可以使用此服务执行的任务。

要在单个语句中指定多项操作，请使用逗号将它们隔开，如下所示：

```
"Action": [
      "sagemaker:action1",
      "sagemaker:action2"
]
```

您也可以使用通配符 （\$1) 指定多个操作。例如，要指定以单词 `Describe` 开头的所有操作，包括以下操作：

```
"Action": "sagemaker:Describe*"
```



要查看 A SageMaker I 操作列表，请参阅*服务授权参考*中的 [Amazon A SageMaker I 的操作、资源和条件密钥](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemaker.html)。

## Amazon A SageMaker I 的政策资源
<a name="security_iam_service-with-iam-id-based-policies-resources"></a>



**支持策略资源：**是

管理员可以使用 AWS JSON 策略来指定谁有权访问什么。也就是说，哪个**主体**可以对什么**资源**执行**操作**，以及在什么**条件**下执行。

`Resource` JSON 策略元素指定要向其应用操作的一个或多个对象。语句必须包含 `Resource` 或 `NotResource` 元素。作为最佳实践，请使用其 [Amazon 资源名称（ARN）](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html)指定资源。对于支持特定资源类型（称为*资源级权限*）的操作，您可以执行此操作。

对于不支持资源级权限的操作（如列出操作），请使用通配符（\$1）指示语句应用于所有资源。

```
"Resource":  "*"
```

要查看 Amazon A SageMaker I 资源类型及其列表 ARNs，请参阅以下参考资料，了解 Amazon A SageMaker I 在《*服务授权参考*》中定义的操作、资源类型和条件密钥。
+ [亚马逊 SageMaker AI](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemaker.html)
+ [Amazon SageMaker 地理空间功能](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemakergeospatialcapabilities.html)
+ [亚马逊 G SageMaker round Truth 合成](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemakergroundtruthsynthetic.html)
+ [带有 Amazon SageMaker AI MLflow](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemakerwithmlflow.html)

要了解您可以使用哪些操作来指定每种资源的 ARN，请参阅 [Ama SageMaker zon AI 定义的操作](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemaker.html#amazonsagemaker-actions-as-permissions)。

## 亚马逊 A SageMaker I 的策略条件密钥
<a name="security_iam_service-with-iam-id-based-policies-conditionkeys"></a>

管理员可以使用 AWS JSON 策略来指定谁有权访问什么。也就是说，哪个**主体**可以对什么**资源**执行**操作**，以及在什么**条件**下执行。

`Condition` 元素根据定义的条件指定语句何时执行。您可以创建使用[条件运算符](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html)（例如，等于或小于）的条件表达式，以使策略中的条件与请求中的值相匹配。要查看所有 AWS 全局条件键，请参阅 *IAM 用户指南*中的[AWS 全局条件上下文密钥](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html)。

SageMaker AI 定义了自己的一组条件键，还支持使用一些全局条件键。要查看所有 AWS 全局条件密钥，请参阅《*服务授权参考*》中的[AWS 全局条件上下文密钥](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_condition-keys.html)。



SageMaker AI 支持许多特定于服务的条件密钥，您可以使用这些条件密钥对以下操作进行精细的访问控制：
+ [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html)
+ [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html)
+ [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html)
+ [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html)
+ [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html)
+ [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateHyperParameterTuningJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateHyperParameterTuningJob.html)
+ [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html)
+ [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateNotebookInstance.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateNotebookInstance.html)
+ [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateNotebookInstance.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateNotebookInstance.html)

要查看 A SageMaker I 条件密钥列表，请参阅《*服务授权参考*》中的 [ SageMaker Amazon AI 条件密](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemaker.html#amazonsagemaker-policy-keys)钥。要了解您可以使用条件键的操作和资源，请参阅 [Amazon A SageMaker I 定义的操作](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemaker.html#amazonsagemaker-actions-as-permissions)。

有关使用 SageMaker AI 条件键的示例，请参阅以下内容：[使用条件键控制 SageMaker AI 资源的创建](security_iam_id-based-policy-examples.md#sagemaker-condition-examples)。

### 示例
<a name="security_iam_service-with-iam-id-based-policies-examples"></a>



要查看基于 SageMaker AI 身份的策略示例，请参阅。[亚马逊 SageMaker AI 基于身份的策略示例](security_iam_id-based-policy-examples.md)

## 基于 SageMaker AI 标签的授权
<a name="security_iam_service-with-iam-tags"></a>

您可以向 SageMaker AI 资源附加标签，也可以在请求中将标签传递给 SageMaker AI。要基于标签控制访问，您需要使用 `sagemaker:ResourceTag/key-name``aws:RequestTag/key-name` 或 `aws:TagKeys` 条件键在策略的[条件元素](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_elements_condition.html)中提供标签信息。有关为 SageMaker AI 资源添加标签的更多信息，请参阅[使用标签控制对 SageMaker AI 资源的访问权限](security_iam_id-based-policy-examples.md#access-tag-policy)。

要查看基于身份的策略（用于根据资源上的标签来限制对该资源的访问）的示例，请参阅 [使用标签控制对 SageMaker AI 资源的访问权限](security_iam_id-based-policy-examples.md#access-tag-policy)。

## SageMaker AI IAM 角色
<a name="security_iam_service-with-iam-roles"></a>

I [AM 角色](https://docs.aws.amazon.com/service-authorization/latest/reference/id_roles.html)是您的 AWS 账户中具有特定权限的实体。

### 在 SageMaker AI 中使用临时证书
<a name="security_iam_service-with-iam-roles-tempcreds"></a>

可以使用临时凭证进行联合身份验证登录，分派 IAM 角色或分派跨账户角色。您可以通过调用[AssumeRole](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html)或之类的 AWS STS API 操作来获取临时安全证书[GetFederationToken](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetFederationToken.html)。

SageMaker AI 支持使用临时证书。

### 服务关联角色
<a name="security_iam_service-with-iam-roles-service-linked"></a>

SageMaker AI 部分支持[服务相关角色](https://docs.aws.amazon.com/service-authorization/latest/reference/id_roles_terms-and-concepts.html#iam-term-service-linked-role)。 SageMaker Studio Classic 目前提供服务相关角色。

### 服务角色
<a name="security_iam_service-with-iam-roles-service"></a>

此功能允许服务代表您担任[服务角色](https://docs.aws.amazon.com/service-authorization/latest/reference/id_roles_terms-and-concepts.html#iam-term-service-role)。此角色允许服务访问其他服务中的资源以代表您完成操作。服务角色显示在 IAM 账户中，并归该账户所有。这意味着，IAM 管理员可以更改该角色的权限。但是，这样做可能会中断服务的功能。

SageMaker AI 支持服务角色。

### 在 A SageMaker I 中选择 IAM 角色
<a name="security_iam_service-with-iam-roles-choose"></a>

在 SageMaker AI 中创建笔记本实例、处理作业、训练作业、托管端点或批量转换作业资源时，必须选择一个角色才能允许 SageMaker A SageMaker I 代表您访问 AI。如果您之前创建过服务角色或服务相关角色， SageMaker AI 会为您提供角色列表供您选择。选择一个允许访问所需 AWS 操作和资源的角色非常重要。有关更多信息，请参阅 [如何使用 SageMaker AI 执行角色](sagemaker-roles.md)。

# 亚马逊 SageMaker AI 基于身份的策略示例
<a name="security_iam_id-based-policy-examples"></a>

默认情况下，IAM 用户和角色无权创建或修改 SageMaker AI 资源。他们也无法使用 AWS 管理控制台 AWS CLI、或 AWS API 执行任务。IAM 管理员必须创建 IAM 策略，以便为用户和角色授予权限以对所需的指定资源执行特定的 API 操作。然后，管理员必须将这些策略附加到需要这些权限的 IAM 用户或组。要了解如何将策略附加到 IAM 用户或组，请参阅《服务授权参考》**中的[添加和删除 IAM 身份权限](https://docs.aws.amazon.com/service-authorization/latest/reference/access_policies_manage-attach-detach.html)。

要了解如何使用这些示例 JSON 策略文档创建基于 IAM 身份的策略，请参阅[在 JSON 选项卡上创建策略](https://docs.aws.amazon.com/service-authorization/latest/reference/access_policies_create.html#access_policies_create-json-editor)。

**Topics**
+ [策略最佳实践](#security_iam_service-with-iam-policy-best-practices)
+ [使用 A SageMaker I 控制台](#security_iam_id-based-policy-examples-console)
+ [允许用户查看他们自己的权限](#security_iam_id-based-policy-examples-view-own-permissions)
+ [使用条件键控制 SageMaker AI 资源的创建](#sagemaker-condition-examples)
+ [使用基于身份的策略控制对 SageMaker AI API 的访问权限](#api-access-policy)
+ [按 IP 地址限制对 SageMaker AI API 和运行时调用的访问权限](#api-ip-filter)
+ [通过 IP 地址限制对笔记本实例的访问](#nbi-ip-filter)
+ [使用标签控制对 SageMaker AI 资源的访问权限](#access-tag-policy)
+ [提供标记 A SageMaker I 资源的权限](#grant-tagging-permissions)
+ [通过可见性条件限制对可搜索资源的访问](#limit-access-to-searchable-resources)

## 策略最佳实践
<a name="security_iam_service-with-iam-policy-best-practices"></a>

基于身份的策略决定了某人是否可以在您的账户中创建、访问或删除 SageMaker AI 资源。这些操作可能会使 AWS 账户产生成本。创建或编辑基于身份的策略时，请遵循以下指南和建议：
+ **开始使用 AWS 托管策略并转向最低权限权限** — 要开始向用户和工作负载授予权限，请使用为许多常见用例授予权限的*AWS 托管策略*。它们在你的版本中可用 AWS 账户。我们建议您通过定义针对您的用例的 AWS 客户托管策略来进一步减少权限。有关更多信息，请参阅《IAM 用户指南》**中的 [AWS 托管策略](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies)或[工作职能的AWS 托管策略](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html)。
+ **应用最低权限**：在使用 IAM 策略设置权限时，请仅授予执行任务所需的权限。为此，您可以定义在特定条件下可以对特定资源执行的操作，也称为*最低权限许可*。有关使用 IAM 应用权限的更多信息，请参阅《IAM 用户指南》**中的 [IAM 中的策略和权限](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)。
+ **使用 IAM 策略中的条件进一步限制访问权限**：您可以向策略添加条件来限制对操作和资源的访问。例如，您可以编写策略条件来指定必须使用 SSL 发送所有请求。如果服务操作是通过特定的方式使用的，则也可以使用条件来授予对服务操作的访问权限 AWS 服务，例如 CloudFormation。有关更多信息，请参阅《IAM 用户指南》**中的 [IAM JSON 策略元素：条件](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html)。
+ **使用 IAM Access Analyzer 验证您的 IAM 策略，以确保权限的安全性和功能性**：IAM Access Analyzer 会验证新策略和现有策略，以确保策略符合 IAM 策略语言（JSON）和 IAM 最佳实践。IAM Access Analyzer 提供 100 多项策略检查和可操作的建议，以帮助您制定安全且功能性强的策略。有关更多信息，请参阅《IAM 用户指南》**中的[使用 IAM Access Analyzer 验证策略](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-policy-validation.html)。
+ **需要多重身份验证 (MFA**)-如果 AWS 账户您的场景需要 IAM 用户或根用户，请启用 MFA 以提高安全性。若要在调用 API 操作时需要 MFA，请将 MFA 条件添加到您的策略中。有关更多信息，请参阅《IAM 用户指南》**中的[使用 MFA 保护 API 访问](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html)。

有关 IAM 中的最佳实操的更多信息，请参阅《IAM 用户指南》**中的 [IAM 中的安全最佳实践](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)。

## 使用 A SageMaker I 控制台
<a name="security_iam_id-based-policy-examples-console"></a>

要访问 Amazon SageMaker AI 控制台，您必须拥有一组最低权限。这些权限必须允许您列出和查看 AWS 账户中 SageMaker AI 资源的详细信息。如果创建的基于身份的策略比最低权限要求更严格，管理控制台将无法正常运行。这包括具有该策略的用户或角色。

为确保这些实体仍然可以使用 SageMaker AI 控制台，您还必须将以下 AWS 托管策略附加到这些实体。如需了解更多信息，请参阅*服务授权参考*中的[为用户添加权限](https://docs.aws.amazon.com/service-authorization/latest/reference/id_users_change-permissions.html#users_change_permissions-add-console)：

对于仅调用 AWS CLI 或 AWS API 的用户，您无需为其设置最低控制台权限。相反，只允许访问与您尝试执行的 API 操作相匹配的操作。

**Topics**
+ [使用 Amazon A SageMaker I 控制台所需的权限](#console-permissions)
+ [使用 Amazon G SageMaker round Truth 控制台所需的权限](#groundtruth-console-policy)
+ [使用 Amazon Augmented AI（预览版）管理控制台所需的权限](#amazon-augmented-ai-console-policy)

### 使用 Amazon A SageMaker I 控制台所需的权限
<a name="console-permissions"></a>

权限参考表列出了 Amazon SageMaker AI API 操作并显示了每个操作所需的权限。有关 Amazon AI AP SageMaker I 操作的更多信息，请参阅[Amazon SageMaker AI API 权限：操作、权限和资源参考](api-permissions-reference.md)。

要使用 Amazon SageMaker AI 控制台，您需要授予其他操作的权限。具体而言，控制台需要允许`ec2`操作显示子网 VPCs、和安全组的权限。或者，控制台需要为 `CreateNotebook`、`CreateTrainingJob` 和 `CreateModel` 等任务创建*执行角色*的权限。使用以下权限策略授予这些权限：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
          "Sid": "SageMakerApis",
          "Effect": "Allow",
          "Action": [
            "sagemaker:*"
          ],
          "Resource": "*"
        },
        {
          "Sid": "VpcConfigurationForCreateForms",
          "Effect": "Allow",
          "Action": [
            "ec2:DescribeVpcs",
            "ec2:DescribeSubnets",
            "ec2:DescribeSecurityGroups"
          ],
          "Resource": "*"
        },
        {
            "Sid":"KmsKeysForCreateForms",
            "Effect":"Allow",
            "Action":[
              "kms:DescribeKey",
              "kms:ListAliases"
            ],
            "Resource":"*"
        },
        {
          "Sid": "AccessAwsMarketplaceSubscriptions",
          "Effect": "Allow",
          "Action": [
            "aws-marketplace:ViewSubscriptions"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "codecommit:BatchGetRepositories",
            "codecommit:CreateRepository",
            "codecommit:GetRepository",
            "codecommit:ListRepositories",
            "codecommit:ListBranches",
            "secretsmanager:CreateSecret",
            "secretsmanager:DescribeSecret",
            "secretsmanager:ListSecrets"
          ],
          "Resource": "*"
        },
        {
          "Sid":"ListAndCreateExecutionRoles",
          "Effect":"Allow",
          "Action":[
            "iam:ListRoles",
            "iam:CreateRole",
            "iam:CreatePolicy",
            "iam:AttachRolePolicy"
          ],
          "Resource":"*"
        },
        {
          "Sid": "DescribeECRMetaData",
          "Effect": "Allow",
          "Action": [
              "ecr:Describe*"
          ],
          "Resource": "*"
        },
        {
          "Sid": "PassRoleForExecutionRoles",
          "Effect": "Allow",
          "Action": [
            "iam:PassRole"
          ],
          "Resource": "*",
          "Condition": {
            "StringEquals": {
                "iam:PassedToService": "sagemaker.amazonaws.com"
            }
          }
        }
    ]
}
```

------



### 使用 Amazon G SageMaker round Truth 控制台所需的权限
<a name="groundtruth-console-policy"></a>

要使用 Amazon G SageMaker round Truth 控制台，您需要授予其他资源的权限。具体来说，管理控制台需要以下权限
+ 可以在 AWS Marketplace 上查看订阅，
+ Amazon Cognito 操作以管理您的私有劳动力
+ Amazon S3 操作以访问输入和输出文件
+ AWS Lambda 列出和调用函数的操作

使用以下权限策略授予这些权限：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "GroundTruthConsole",
            "Effect": "Allow",
            "Action": [
                "aws-marketplace:ViewSubscriptions",

                "cognito-idp:AdminAddUserToGroup",
                "cognito-idp:AdminCreateUser",
                "cognito-idp:AdminDeleteUser",
                "cognito-idp:AdminDisableUser",
                "cognito-idp:AdminEnableUser",
                "cognito-idp:AdminRemoveUserFromGroup",
                "cognito-idp:CreateGroup",
                "cognito-idp:CreateUserPool",
                "cognito-idp:CreateUserPoolClient",
                "cognito-idp:CreateUserPoolDomain",
                "cognito-idp:DescribeUserPool",
                "cognito-idp:DescribeUserPoolClient",
                "cognito-idp:ListGroups",
                "cognito-idp:ListIdentityProviders",
                "cognito-idp:ListUsers",
                "cognito-idp:ListUsersInGroup",
                "cognito-idp:ListUserPoolClients",
                "cognito-idp:ListUserPools",
                "cognito-idp:UpdateUserPool",
                "cognito-idp:UpdateUserPoolClient",

                "groundtruthlabeling:DescribeConsoleJob",
                "groundtruthlabeling:ListDatasetObjects",
                "groundtruthlabeling:RunGenerateManifestByCrawlingJob",

                "lambda:InvokeFunction",
                "lambda:ListFunctions",

                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": "*"
        }
    ]
}
```

------

### 使用 Amazon Augmented AI（预览版）管理控制台所需的权限
<a name="amazon-augmented-ai-console-policy"></a>

要使用 Augmented AI 控制台，您需要授予其他资源的权限。使用以下权限策略授予这些权限：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "sagemaker:*Algorithm",
                "sagemaker:*Algorithms",
                "sagemaker:*App",
                "sagemaker:*Apps",
                "sagemaker:*AutoMLJob",
                "sagemaker:*AutoMLJobs",
                "sagemaker:*CodeRepositories",
                "sagemaker:*CodeRepository",
                "sagemaker:*CompilationJob",
                "sagemaker:*CompilationJobs",
                "sagemaker:*Endpoint",
                "sagemaker:*EndpointConfig",
                "sagemaker:*EndpointConfigs",
                "sagemaker:*EndpointWeightsAndCapacities",
                "sagemaker:*Endpoints",
                "sagemaker:*Experiment",
                "sagemaker:*Experiments",
                "sagemaker:*FlowDefinitions",
                "sagemaker:*HumanLoop",
                "sagemaker:*HumanLoops",
                "sagemaker:*HumanTaskUi",
                "sagemaker:*HumanTaskUis",
                "sagemaker:*HyperParameterTuningJob",
                "sagemaker:*HyperParameterTuningJobs",
                "sagemaker:*LabelingJob",
                "sagemaker:*LabelingJobs",
                "sagemaker:*Metrics",
                "sagemaker:*Model",
                "sagemaker:*ModelPackage",
                "sagemaker:*ModelPackages",
                "sagemaker:*Models",
                "sagemaker:*MonitoringExecutions",
                "sagemaker:*MonitoringSchedule",
                "sagemaker:*MonitoringSchedules",
                "sagemaker:*NotebookInstance",
                "sagemaker:*NotebookInstanceLifecycleConfig",
                "sagemaker:*NotebookInstanceLifecycleConfigs",
                "sagemaker:*NotebookInstanceUrl",
                "sagemaker:*NotebookInstances",
                "sagemaker:*ProcessingJob",
                "sagemaker:*ProcessingJobs",
                "sagemaker:*RenderUiTemplate",
                "sagemaker:*Search",
                "sagemaker:*SearchSuggestions",
                "sagemaker:*Tags",
                "sagemaker:*TrainingJob",
                "sagemaker:*TrainingJobs",
                "sagemaker:*TransformJob",
                "sagemaker:*TransformJobs",
                "sagemaker:*Trial",
                "sagemaker:*TrialComponent",
                "sagemaker:*TrialComponents",
                "sagemaker:*Trials",
                "sagemaker:*Workteam",
                "sagemaker:*Workteams"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "sagemaker:*FlowDefinition"
            ],
            "Resource": "*",
            "Condition": {
                "StringEqualsIfExists": {
                    "sagemaker:WorkteamType": [
                        "private-crowd",
                        "vendor-crowd"
                    ]
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "application-autoscaling:DeleteScalingPolicy",
                "application-autoscaling:DeleteScheduledAction",
                "application-autoscaling:DeregisterScalableTarget",
                "application-autoscaling:DescribeScalableTargets",
                "application-autoscaling:DescribeScalingActivities",
                "application-autoscaling:DescribeScalingPolicies",
                "application-autoscaling:DescribeScheduledActions",
                "application-autoscaling:PutScalingPolicy",
                "application-autoscaling:PutScheduledAction",
                "application-autoscaling:RegisterScalableTarget",
                "aws-marketplace:ViewSubscriptions",
                "cloudwatch:DeleteAlarms",
                "cloudwatch:DescribeAlarms",
                "cloudwatch:GetMetricData",
                "cloudwatch:GetMetricStatistics",
                "cloudwatch:ListMetrics",
                "cloudwatch:PutMetricAlarm",
                "cloudwatch:PutMetricData",
                "codecommit:BatchGetRepositories",
                "codecommit:CreateRepository",
                "codecommit:GetRepository",
                "codecommit:ListBranches",
                "codecommit:ListRepositories",
                "cognito-idp:AdminAddUserToGroup",
                "cognito-idp:AdminCreateUser",
                "cognito-idp:AdminDeleteUser",
                "cognito-idp:AdminDisableUser",
                "cognito-idp:AdminEnableUser",
                "cognito-idp:AdminRemoveUserFromGroup",
                "cognito-idp:CreateGroup",
                "cognito-idp:CreateUserPool",
                "cognito-idp:CreateUserPoolClient",
                "cognito-idp:CreateUserPoolDomain",
                "cognito-idp:DescribeUserPool",
                "cognito-idp:DescribeUserPoolClient",
                "cognito-idp:ListGroups",
                "cognito-idp:ListIdentityProviders",
                "cognito-idp:ListUserPoolClients",
                "cognito-idp:ListUserPools",
                "cognito-idp:ListUsers",
                "cognito-idp:ListUsersInGroup",
                "cognito-idp:UpdateUserPool",
                "cognito-idp:UpdateUserPoolClient",
                "ec2:CreateNetworkInterface",
                "ec2:CreateNetworkInterfacePermission",
                "ec2:CreateVpcEndpoint",
                "ec2:DeleteNetworkInterface",
                "ec2:DeleteNetworkInterfacePermission",
                "ec2:DescribeDhcpOptions",
                "ec2:DescribeNetworkInterfaces",
                "ec2:DescribeRouteTables",
                "ec2:DescribeSecurityGroups",
                "ec2:DescribeSubnets",
                "ec2:DescribeVpcEndpoints",
                "ec2:DescribeVpcs",
                "ecr:BatchCheckLayerAvailability",
                "ecr:BatchGetImage",
                "ecr:CreateRepository",
                "ecr:Describe*",
                "ecr:GetAuthorizationToken",
                "ecr:GetDownloadUrlForLayer",
                "elasticfilesystem:DescribeFileSystems",
                "elasticfilesystem:DescribeMountTargets",
                "fsx:DescribeFileSystems",
                "glue:CreateJob",
                "glue:DeleteJob",
                "glue:GetJob",
                "glue:GetJobRun",
                "glue:GetJobRuns",
                "glue:GetJobs",
                "glue:ResetJobBookmark",
                "glue:StartJobRun",
                "glue:UpdateJob",
                "groundtruthlabeling:*",
                "iam:ListRoles",
                "kms:DescribeKey",
                "kms:ListAliases",
                "lambda:ListFunctions",
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:DescribeLogGroups",
                "logs:DescribeLogStreams",
                "logs:GetLogEvents",
                "logs:PutLogEvents",
                "sns:ListTopics"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogDelivery",
                "logs:DeleteLogDelivery",
                "logs:DescribeResourcePolicies",
                "logs:GetLogDelivery",
                "logs:ListLogDeliveries",
                "logs:PutResourcePolicy",
                "logs:UpdateLogDelivery"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "ecr:SetRepositoryPolicy",
                "ecr:CompleteLayerUpload",
                "ecr:BatchDeleteImage",
                "ecr:UploadLayerPart",
                "ecr:DeleteRepositoryPolicy",
                "ecr:InitiateLayerUpload",
                "ecr:DeleteRepository",
                "ecr:PutImage"
            ],
            "Resource": "arn:aws:ecr:*:*:repository/*sagemaker*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "codecommit:GitPull",
                "codecommit:GitPush"
            ],
            "Resource": [
                "arn:aws:codecommit:*:*:*sagemaker*",
                "arn:aws:codecommit:*:*:*SageMaker*",
                "arn:aws:codecommit:*:*:*Sagemaker*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "secretsmanager:ListSecrets"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "secretsmanager:DescribeSecret",
                "secretsmanager:GetSecretValue",
                "secretsmanager:CreateSecret"
            ],
            "Resource": [
                "arn:aws:secretsmanager:*:*:secret:AmazonSageMaker-*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "secretsmanager:DescribeSecret",
                "secretsmanager:GetSecretValue"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "secretsmanager:ResourceTag/SageMaker": "true"
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "robomaker:CreateSimulationApplication",
                "robomaker:DescribeSimulationApplication",
                "robomaker:DeleteSimulationApplication"
            ],
            "Resource": [
                "*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "robomaker:CreateSimulationJob",
                "robomaker:DescribeSimulationJob",
                "robomaker:CancelSimulationJob"
            ],
            "Resource": [
                "*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject",
                "s3:AbortMultipartUpload",
                "s3:GetBucketCors",
                "s3:PutBucketCors"
            ],
            "Resource": [
                "arn:aws:s3:::*SageMaker*",
                "arn:aws:s3:::*Sagemaker*",
                "arn:aws:s3:::*sagemaker*",
                "arn:aws:s3:::*aws-glue*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:CreateBucket",
                "s3:GetBucketLocation",
                "s3:ListBucket",
                "s3:ListAllMyBuckets"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject"
            ],
            "Resource": "*",
            "Condition": {
                "StringEqualsIgnoreCase": {
                    "s3:ExistingObjectTag/SageMaker": "true"
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "lambda:InvokeFunction"
            ],
            "Resource": [
                "arn:aws:lambda:*:*:function:*SageMaker*",
                "arn:aws:lambda:*:*:function:*sagemaker*",
                "arn:aws:lambda:*:*:function:*Sagemaker*",
                "arn:aws:lambda:*:*:function:*LabelingFunction*"
            ]
        },
        {
            "Action": "iam:CreateServiceLinkedRole",
            "Effect": "Allow",
            "Resource": "arn:aws:iam::*:role/aws-service-role/sagemaker.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_SageMakerEndpoint",
            "Condition": {
                "StringLike": {
                    "iam:AWSServiceName": "sagemaker.application-autoscaling.amazonaws.com"
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": "iam:CreateServiceLinkedRole",
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "iam:AWSServiceName": "robomaker.amazonaws.com"
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "sns:Subscribe",
                "sns:CreateTopic"
            ],
            "Resource": [
                "arn:aws:sns:*:*:*SageMaker*",
                "arn:aws:sns:*:*:*Sagemaker*",
                "arn:aws:sns:*:*:*sagemaker*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "iam:PassRole"
            ],
            "Resource": "arn:aws:iam::*:role/*",
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": [
                        "sagemaker.amazonaws.com",
                        "glue.amazonaws.com",
                        "robomaker.amazonaws.com",
                        "states.amazonaws.com"
                    ]
                }
            }
        }
    ]
}
```

------

## 允许用户查看他们自己的权限
<a name="security_iam_id-based-policy-examples-view-own-permissions"></a>

该示例说明了您如何创建策略，以允许 IAM 用户查看附加到其用户身份的内联和托管式策略。此策略包括在控制台上或使用 AWS CLI 或 AWS API 以编程方式完成此操作的权限。

```
{
    "Version": "2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "ViewOwnUserInfo",
            "Effect": "Allow",
            "Action": [
                "iam:GetUserPolicy",
                "iam:ListGroupsForUser",
                "iam:ListAttachedUserPolicies",
                "iam:ListUserPolicies",
                "iam:GetUser"
            ],
            "Resource": ["arn:aws:iam::*:user/${aws:username}"]
        },
        {
            "Sid": "NavigateInConsole",
            "Effect": "Allow",
            "Action": [
                "iam:GetGroupPolicy",
                "iam:GetPolicyVersion",
                "iam:GetPolicy",
                "iam:ListAttachedGroupPolicies",
                "iam:ListGroupPolicies",
                "iam:ListPolicyVersions",
                "iam:ListPolicies",
                "iam:ListUsers"
            ],
            "Resource": "*"
        }
    ]
}
```

## 使用条件键控制 SageMaker AI 资源的创建
<a name="sagemaker-condition-examples"></a>

使用 SageMaker 特定于 AI 的条件键控制精细访问权限以允许创建 SageMaker AI 资源。有关在 IAM 策略中使用条件键的信息，请参阅《IAM 用户指南》**中的 [IAM JSON 策略元素：条件](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_elements_condition.html)。

条件密钥、相关的 API 操作以及相关文档的链接列在《*服务授权参考*》中的 [ SageMaker AI 条件密钥](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemaker.html#amazonsagemaker-policy-keys)中。

以下示例说明如何使用 SageMaker AI 条件键来控制访问权限。

**Topics**
+ [使用文件系统条件键控制对 SageMaker AI 资源的访问](#access-fs-condition-keys)
+ [将训练限制在特定 VPC](#sagemaker-condition-vpc)
+ [限制对地面实况标注作业和 Amazon A2I 人工审核工作流程的劳动力类型的访问权限](#sagemaker-condition-keys-labeling)
+ [强制加密输入数据](#sagemaker-condition-kms)
+ [对训练作业实施网络隔离](#sagemaker-condition-isolation)
+ [为训练作业执行特定的实例类型](#sagemaker-condition-instance)
+ [在创建笔记本实例时强制禁止互联网权限和 root 权限](#sagemaker-condition-nbi-lockdown)

### 使用文件系统条件键控制对 SageMaker AI 资源的访问
<a name="access-fs-condition-keys"></a>

SageMaker AI 训练为训练算法提供了安全的基础架构，但在某些情况下，您可能需要增强深度防御。例如，您可以最大程度地降低在算法中运行不受信任的代码的风险，或者您在组织中具有特定的安全性要求。在这些情况下，可以使用 IAM 策略的条件元素中特定于服务的条件键来缩小用户范围：
+ 特定文件系统
+ 目录
+ 访问模式（读写、只读）
+ 安全组

**Topics**
+ [限制 IAM 用户使用特定目录和访问模式](#access-fs-condition-keys-ex-dirs)
+ [限制用户使用特定文件系统](#access-fs-condition-keys-ex-fs)

#### 限制 IAM 用户使用特定目录和访问模式
<a name="access-fs-condition-keys-ex-dirs"></a>

以下策略将用户限制为 EFS 文件系统的`/sagemaker/xgboost-dm/train`和`/sagemaker/xgboost-dm/validation`目录`ro`（只读） AccessMode：

**注意**  
当允许目录时，训练算法也可以访问其所有子目录。POSIX 权限会被忽略。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "AccessToElasticFileSystem",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateTrainingJob",
                "sagemaker:CreateHyperParameterTuningJob"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "sagemaker:FileSystemId": "fs-12345678",
                    "sagemaker:FileSystemAccessMode": "ro",
                    "sagemaker:FileSystemType": "EFS",
                    "sagemaker:FileSystemDirectoryPath": "/sagemaker/xgboost-dm/train"
                }
            }
        },
        {
            "Sid": "AccessToElasticFileSystemValidation",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateTrainingJob",
                "sagemaker:CreateHyperParameterTuningJob"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "sagemaker:FileSystemId": "fs-12345678",
                    "sagemaker:FileSystemAccessMode": "ro",
                    "sagemaker:FileSystemType": "EFS",
                    "sagemaker:FileSystemDirectoryPath": "/sagemaker/xgboost-dm/validation"
                }
            }
        }
    ]
}
```

------

#### 限制用户使用特定文件系统
<a name="access-fs-condition-keys-ex-fs"></a>

为防止使用用户空间客户端的恶意算法直接访问账户中的任何文件系统，可以限制网络流量。要限制这种流量，只允许从特定安全组进入。在以下示例中， 用户只能使用指定的安全组访问文件系统：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "AccessToLustreFileSystem",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateTrainingJob",
                "sagemaker:CreateHyperParameterTuningJob"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "sagemaker:FileSystemId": "fs-12345678",
                    "sagemaker:FileSystemAccessMode": "ro",
                    "sagemaker:FileSystemType": "FSxLustre",
                    "sagemaker:FileSystemDirectoryPath": "/fsx/sagemaker/xgboost/train"
                },
                "ForAllValues:StringEquals": {
                    "sagemaker:VpcSecurityGroupIds": [
                        "sg-12345678"
                    ]
                }
            }
        }
    ]
}
```

------

此示例可将算法限制在特定文件系统中。不过，这并不妨碍算法使用用户空间客户端访问该文件系统中的任何目录。要缓解这种情况，您可以：
+ 确保文件系统仅包含您信任的用户要访问的数据
+ 创建一个 IAM 角色，限制您的用户使用已批准的 ECR 存储库中的算法启动训练作业

有关如何在 SageMaker AI 中使用角色的更多信息，请参阅 [SageMaker AI 角色](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html)。

### 将训练限制在特定 VPC
<a name="sagemaker-condition-vpc"></a>

限制 AWS 用户在 Amazon VPC 内创建训练任务。在 VPC 中创建训练作业时，使用 VPC 流量日志监控进出训练集群的所有流量。有关使用 VPC 流日志的信息，请参阅《Amazon Virtual Private Cloud 用户指南》**中的 [VPC 流日志](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html)。

以下策略强制由 VPC 内部调用 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html) 的用户创建训练作业：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "AllowFromVpc",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateTrainingJob",
                "sagemaker:CreateHyperParameterTuningJob"
            ],
            "Resource": "*",
            "Condition": {
                "ForAllValues:StringEquals": {
                    "sagemaker:VpcSubnets": ["subnet-a1234"],
                    "sagemaker:VpcSecurityGroupIds": ["sg12345", "sg-67890"]
                },
                "Null": {
                    "sagemaker:VpcSubnets": "false",
                    "sagemaker:VpcSecurityGroupIds": "false"
                }
            }
        }

    ]
}
```

------

### 限制对地面实况标注作业和 Amazon A2I 人工审核工作流程的劳动力类型的访问权限
<a name="sagemaker-condition-keys-labeling"></a>

Amazon SageMaker Ground Truth 和 Amazon Agumented AI 工作团队分为三[种劳动力类型](https://docs.aws.amazon.com/sagemaker/latest/dg/sms-workforce-management.html)之一：
+ 公开（与 Amazon Mechanical Turk 合作）
+ 专属
+ 供应商

您可以使用这些类型之一或工作团队 ARN 限制用户访问特定工作团队。为此，请`sagemaker:WorkteamType` and/or 使用`sagemaker:WorkteamArn`条件键。对于 `sagemaker:WorkteamType` 条件键，请使用[字符串条件运算符](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String)。对于 `sagemaker:WorkteamArn` 条件键，请使用 [Amazon 资源名称 (ARN) 条件运算符](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_ARN)。如果用户尝试使用受限的工作团队创建标签作业， SageMaker AI 会返回拒绝访问错误。

以下策略展示了使用 `sagemaker:WorkteamType` 和 `sagemaker:WorkteamArn` 条件键以及适当条件运算符和有效条件值的不同方法。

以下示例使用 `sagemaker:WorkteamType` 条件键和 `StringEquals` 条件运算符一起限制对公有工作团队的访问。它接受以下格式的条件值：`workforcetype-crowd`，其中*workforcetype*可以等于`public``private`、或`vendor`。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "RestrictWorkteamType",
            "Effect": "Deny",
            "Action": "sagemaker:CreateLabelingJob",
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "sagemaker:WorkteamType": "public-crowd"
                }
            }
        }
    ]
}
```

------

以下策略演示如何使用 `sagemaker:WorkteamArn` 条件键限制对公有工作团队的访问。第一个策略演示如何将该条件键与工作团队 ARN 的 IAM 有效正则表达式变量和 `ArnLike` 条件运算符一起使用。第二个策略演示如何将该条件键与 `ArnEquals` 条件运算符和工作团队 ARN 一起使用。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "RestrictWorkteamType",
            "Effect": "Deny",
            "Action": "sagemaker:CreateLabelingJob",
            "Resource": "*",
            "Condition": {
                "ArnLike": {
                    "sagemaker:WorkteamArn": "arn:aws:sagemaker:*:*:workteam/public-crowd/*"
                }
            }
        }
    ]
}
```

------

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "RestrictWorkteamType",
            "Effect": "Deny",
            "Action": "sagemaker:CreateLabelingJob",
            "Resource": "*",
            "Condition": {
                "ArnEquals": {
                    "sagemaker:WorkteamArn": "arn:aws:sagemaker:us-west-2:394669845002:workteam/public-crowd/default"
                }
            }
        }
    ]
}
```

------

 

### 强制加密输入数据
<a name="sagemaker-condition-kms"></a>

以下策略限制用户在创建时使用`sagemaker:VolumeKmsKey`条件 AWS KMS 密钥指定用于加密输入数据的密钥：
+ 训练
+ 超参数调整
+ 标签作业

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "EnforceEncryption",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateTrainingJob",
                "sagemaker:CreateHyperParameterTuningJob",
                "sagemaker:CreateLabelingJob",
                "sagemaker:CreateFlowDefinition"
            ],
            "Resource": "*",
            "Condition": {
                "ArnEquals": {
                    "sagemaker:VolumeKmsKey": "arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
                }
            }
        }

     ]
}
```

------

### 对训练作业实施网络隔离
<a name="sagemaker-condition-isolation"></a>

以下策略限制用户在使用 `sagemaker:NetworkIsolation` 条件键创建训练作业时启用网络隔离：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "EnforceIsolation",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateTrainingJob",
                "sagemaker:CreateHyperParameterTuningJob"
            ],
            "Resource": "*",
            "Condition": {
                "Bool": {
                    "sagemaker:NetworkIsolation": "true"
                }
            }
        }
    ]
}
```

------

### 为训练作业执行特定的实例类型
<a name="sagemaker-condition-instance"></a>

以下策略限制用户在使用 `sagemaker:InstanceTypes` 条件键创建训练作业时使用特定实例类型：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "EnforceInstanceType",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateTrainingJob",
                "sagemaker:CreateHyperParameterTuningJob"
            ],
            "Resource": "*",
            "Condition": {
                "ForAllValues:StringLike": {
                    "sagemaker:InstanceTypes": ["ml.c5.*"]
                }
            }
        }

     ]
}
```

------

### 在创建笔记本实例时强制禁止互联网权限和 root 权限
<a name="sagemaker-condition-nbi-lockdown"></a>

您可以禁用对笔记本实例的 Internet 访问和根访问，以帮助提高它们的安全性。有关控制笔记本实例 root 权限的信息，请参阅 [控制对 SageMaker 笔记本实例的 root 访问权限](nbi-root-access.md)。有关禁用笔记本实例互联网权限的信息，请参阅 [将 VPC 中的笔记本实例连接到外部资源](appendix-notebook-and-internet-access.md)。

以下策略要求用户在创建实例时禁用网络访问权限，或在创建或更新笔记本实例时禁用根访问权限。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "LockDownCreateNotebookInstance",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateNotebookInstance"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "sagemaker:DirectInternetAccess": "Disabled",
                    "sagemaker:RootAccess": "Disabled"
                },
                "Null": {
                  "sagemaker:VpcSubnets": "false",
                  "sagemaker:VpcSecurityGroupIds": "false"
                }
            }
        },
        {
            "Sid": "LockDownUpdateNotebookInstance",
            "Effect": "Allow",
            "Action": [
                "sagemaker:UpdateNotebookInstance"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "sagemaker:RootAccess": "Disabled"
                }
            }
        }
     ]
}
```

------

## 使用基于身份的策略控制对 SageMaker AI API 的访问权限
<a name="api-access-policy"></a>

要控制对 SageMaker AI API 调用和对 A SageMaker I 托管终端节点的调用的访问权限，请使用基于身份的 IAM 策略。

**Topics**
+ [限制从 VPC 内部调用访问 SageMaker AI API 和运行时间](#api-access-policy-vpc)

### 限制从 VPC 内部调用访问 SageMaker AI API 和运行时间
<a name="api-access-policy-vpc"></a>

如果您在 VPC 中设置接口终端节点，VPC 之外的个人可以通过互联网连接到 SageMaker AI API 和运行时。为防止出现这种情况，可附加 IAM 策略，限制访问来自 VPC 内部的呼叫。这些呼叫必须仅限于有权访问您的 SageMaker AI 资源的所有用户和群组。有关为 SageMaker AI API 和运行时创建 VPC 接口终端节点的信息，请参阅[在您的 VPC 中连接到 SageMaker AI](interface-vpc-endpoint.md)。

**重要**  
如果您应用类似于以下策略之一的 IAM 策略，则用户无法 APIs 通过控制台访问指定的 SageMaker AI。

要限制只能访问来自 VPC 内部的连接，请创建一个限制访问的 AWS Identity and Access Management 策略。该访问权限必须限制为只能来自 VPC 内部的呼叫。然后将该策略添加到用于访问 SageMaker AI API 或运行时的每个 AWS Identity and Access Management 用户、群组或角色。

**注意**  
此策略只允许连接到创建接口终端节点的子网中的调用方。

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

****  

```
{
    "Id": "api-example-1",
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "EnableAPIAccess",
            "Effect": "Allow",
            "Action": [
                "sagemaker:*"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:SourceVpc": "vpc-111bbaaa"
                }
            }
        }
    ]
}
```

------

若要限制 API 的访问权限，使其仅限于使用接口端点进行的调用，请使用 `aws:SourceVpce` 条件键，而不是 `aws:SourceVpc`：

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

****  

```
{
    "Id": "api-example-1",
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "EnableAPIAccess",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreatePresignedNotebookInstanceUrl"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:sourceVpce": [
                        "vpce-111bbccc",
                        "vpce-111bbddd"
                    ]
                }
            }
        }
    ]
}
```

------

## 按 IP 地址限制对 SageMaker AI API 和运行时调用的访问权限
<a name="api-ip-filter"></a>

您只能允许从您指定的列表中的 IP 地址访问 SageMaker AI API 调用和运行时调用。为此，请创建一个 IAM 策略，拒绝访问 API，除非调用来自列表中的 IP 地址。然后将该策略附加到用于访问 API 或运行时的每个 AWS Identity and Access Management 用户、群组或角色。有关如何创建 IAM 策略的信息，请参阅《AWS Identity and Access Management 用户指南》**中的[创建 IAM 策略](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html)。

要指定可访问 API 调用的 IP 地址列表，请使用
+ `IpAddress` 条件运算符
+ `aws:SourceIP` 条件语境键

有关 IAM 条件运算符的信息，请参阅《AWS Identity and Access Management 用户指南》**中的 [IAM JSON 策略元素：条件运算符](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html)。有关 IAM 条件上下文键的信息，请参阅 [AWS 全局条件上下文键](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html)。

例如，以下策略仅允许从范围 `192.0.2.0`-`192.0.2.255` 和 `203.0.113.0`-`203.0.113.255` 内的 IP 地址中访问 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html)：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [

        {
            "Effect": "Allow",
            "Action": "sagemaker:CreateTrainingJob",
            "Resource": "*",
            "Condition": {
                "IpAddress": {
                    "aws:SourceIp": [
                        "192.0.2.0/24",
                        "203.0.113.0/24"
                    ]
                }
            }
        }
    ]
}
```

------

## 通过 IP 地址限制对笔记本实例的访问
<a name="nbi-ip-filter"></a>

您可以只允许您指定的列表中的 IP 地址访问笔记本实例。为此，请创建一个 IAM 策略，拒绝访问 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreatePresignedNotebookInstanceUrl.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreatePresignedNotebookInstanceUrl.html)，除非呼叫来自列表中的 IP 地址。然后，将此策略附加到用于访问笔记本实例的每个 AWS Identity and Access Management 用户、组或角色。有关如何创建 IAM 策略的信息，请参阅《AWS Identity and Access Management 用户指南》**中的[创建 IAM 策略](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html)。

要指定希望访问笔记本实例的 IP 地址列表，请使用
+ `IpAddress` 条件运算符
+ `aws:SourceIP` 条件语境键

有关 IAM 条件运算符的信息，请参阅《AWS Identity and Access Management 用户指南》**中的 [IAM JSON 策略元素：条件运算符](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html)。有关 IAM 条件上下文键的信息，请参阅 [AWS 全局条件上下文键](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html)。

例如，以下策略仅允许从范围 `192.0.2.0`-`192.0.2.255` 和 `203.0.113.0`-`203.0.113.255` 之间的 IP 地址访问笔记本实例：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [

        {
            "Effect": "Allow",
            "Action": "sagemaker:CreatePresignedNotebookInstanceUrl",
            "Resource": "*",
            "Condition": {
                "IpAddress": {
                    "aws:SourceIp": [
                        "192.0.2.0/24",
                        "203.0.113.0/24"
                    ]
                }
            }
        }
    ]
}
```

------

该策略限制对 `CreatePresignedNotebookInstanceUrl` 的调用以及调用返回的 URL 的访问。该策略还会限制对控制台中所打开笔记本实例的访问。每个 HTTP 请求和尝试连接到笔记本实例的 WebSocket 帧都会强制执行此操作。

**注意**  
通过 [VPC 接口终端节点连接到 SageMaker AI 时，使用此方法按 IP 地址筛选是不兼容的。](https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html) 。有关在通过 VPC 接口终端节点连接时限制对笔记本实例访问的信息，请参阅[通过 VPC 接口终端节点连接到笔记本实例](notebook-interface-endpoint.md)。

## 使用标签控制对 SageMaker AI 资源的访问权限
<a name="access-tag-policy"></a>

在 IAM 策略中指定标签以控制对 A SageMaker I 资源组的访问权限。使用标签实施基于属性的访问权限控制 (ABAC)。使用标签有助于将资源访问权限划分给特定用户组。您可以让一个团队访问一组资源，让另一个团队访问另一组资源。您可以在 IAM 策略中提供 `ResourceTag` 条件，为每个组提供访问权限。

**注意**  
基于标签的策略无法限制以下 API 调用：  
DeleteImageVersion
DescribeImageVersion
ListAlgorithms
ListCodeRepositories
ListCompilationJobs
ListEndpointConfigs
ListEndpoints
ListFlowDefinitions
ListHumanTaskUis
ListHyperparameterTuningJobs
ListLabelingJobs
ListLabelingJobsForWorkteam
ListModelPackages
ListModels
ListNotebookInstanceLifecycleConfigs
ListNotebookInstances
ListSubscribedWorkteams
ListTags
ListProcessingJobs
ListTrainingJobs
ListTrainingJobsForHyperParameterTuningJob
ListTransformJobs
ListWorkteams
Search

一个简单的示例可帮助您了解如何使用标签来划分资源。假设您在 AWS 账户中定义了两个不同的 IAM 组`DevTeam2`，名为`DevTeam1`和。您还创建了 10 个笔记本实例。您将在一个项目中使用 5 个笔记本实例。将在第二个项目中使用另外 5 个笔记本实例。您可以为 `DevTeam1` 提供对用于第一个项目的笔记本实例进行 API 调用的权限。您可以让 `DevTeam2` 对第二个项目使用的笔记本实例进行 API 调用。

以下过程提供了一个简单示例，可帮助您理解添加标签的概念。您可以用它来实施上一段中描述的解决方案。

**控制对 API 调用的访问（示例）**

1. 将具有键 `Project` 和值 `A` 的标签添加到用于第一个项目的笔记本实例。有关向 SageMaker AI 资源添加标签的信息，请参阅[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AddTags.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AddTags.html)。

1. 将具有键 `Project` 和值 `B` 的标签添加到用于第二个项目的笔记本实例。

1. 创建一个带有 `ResourceTag` 条件的 IAM 策略，拒绝访问第二个项目使用的笔记本实例。然后，将该策略附加到 `DevTeam1` 中。下面的策略示例拒绝对任何笔记本实例进行所有 API 调用，这些笔记本实例的标记键为 `Project`，值为 `B`：

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

****  

   ```
   {
     "Version":"2012-10-17",		 	 	 
     "Statement": [
       {
         "Effect": "Allow",
         "Action": "sagemaker:*",
         "Resource": "*"
       },
       {
         "Effect": "Deny",
         "Action": "sagemaker:*",
         "Resource": "*",
         "Condition": {
           "StringEquals": {
             "sagemaker:ResourceTag/Project": "B"
           }
         }
       },
       {
         "Effect": "Deny",
         "Action": [
           "sagemaker:AddTags",
           "sagemaker:DeleteTags"
         ],
         "Resource": "*"
       }
     ]
   }
   ```

------

   有关创建 IAM 策略并将其附加到身份的信息，请参阅《AWS Identity and Access Management 用户指南》**中的[使用策略控制访问权限](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_controlling.html)。

1. 创建一个带有 `ResourceTag` 条件的 IAM 策略，拒绝访问第一个项目使用的笔记本实例。然后，将该策略附加到 `DevTeam2` 中。下面的策略示例拒绝对任何笔记本实例进行所有 API 调用，这些笔记本实例的标记键为 `Project`，值为 `A`：

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

****  

   ```
   {
     "Version":"2012-10-17",		 	 	 
     "Statement": [
       {
         "Effect": "Allow",
         "Action": "sagemaker:*",
         "Resource": "*"
       },
       {
         "Effect": "Deny",
         "Action": "sagemaker:*",
         "Resource": "*",
         "Condition": {
           "StringEquals": {
             "sagemaker:ResourceTag/Project": "A"
           }
         }
       },
       {
         "Effect": "Deny",
         "Action": [
           "sagemaker:AddTags",
           "sagemaker:DeleteTags"
         ],
         "Resource": "*"
       }
     ]
   }
   ```

------

## 提供标记 A SageMaker I 资源的权限
<a name="grant-tagging-permissions"></a>

[标签](https://docs.aws.amazon.com/whitepapers/latest/tagging-best-practices/what-are-tags.html)是您可以附加到某些 AWS 资源的元数据标签。标签由键值对组成，为各种[标签使用场景](https://docs.aws.amazon.com/whitepapers/latest/tagging-best-practices/tagging-use-cases.html)提供了一种灵活的方式，为资源标注元数据属性：
+ 搜索
+ 安全性
+ [成本归因](https://docs.aws.amazon.com/whitepapers/latest/sagemaker-studio-admin-best-practices/cost-attribution.html)
+ 访问控制
+ 自动化

它们可用于权限和策略、服务配额以及与其他 AWS 服务的集成。标签可以由用户定义，也可以在创建资源时 AWS 生成。这取决于是用户手动指定自定义标签，还是 AWS 服务自动生成标签。
+  SageMaker AI 中用户@@ *定义*的标签：用户可以在使用 CLI SageMaker SDKs、、 SageMaker A AWS CLI I 控制台或 CloudFormation 模板创建 SageMaker AI 资源时添加标签。 SageMaker APIs
**注意**  
如果资源后来更新，标签值被更改或替换，用户定义的标签可以被覆盖。例如，以 \$1Team：A\$1 创建的训练作业可能会被错误地更新并重新标记为 \$1Team：B\$1. 因此，允许的权限可能分配不当。因此，在允许用户或用户组添加标签时应小心谨慎，因为他们可能会覆盖现有的标记值。最佳做法是严格控制标记权限范围，并使用 IAM 条件来控制标记能力。
+ AWS 在 SageMaker AI 中@@ *生成的标签*： SageMaker AI 会自动标记其创建的某些资源。例如，Studio 和 Studio Classic 会自动将`sagemaker:domain-arn`标签分配给他们创建的 SageMaker AI 资源。使用域 ARN 标记新资源可以追溯训练作业、模型和端点等 AI 资源是 SageMaker 如何产生的。为了进行更精细的控制和跟踪，新资源会收到额外的标记，如
  + `sagemaker:user-profile-arn` - 创建资源的用户配置文件的 ARN。这样就可以跟踪特定用户创建的资源。
  + `sagemaker:space-arn` - 创建资源所在空间的 ARN。这样就可以对每个空间的资源进行分组和隔离。
**注意**  
AWS 用户无法更改生成的标签。

有关为 AWS 资源添加标签的一般信息以及最佳实践，请参阅为资源[添加 AWS 标签](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html)。有关主要标记使用场景的信息，请参阅[标记使用场景](https://docs.aws.amazon.com/whitepapers/latest/tagging-best-practices/tagging-use-cases.html)。

### 授予在创建 SageMaker AI 资源时添加标签的权限
<a name="grant-tagging-permissions-with-create"></a>

您可以允许用户（用户*定义的标签*）或 Studio 和 Studio Classic（*AWS 生成的标签*）在创建新的 SageMaker AI 资源时为新的 AI 资源添加标签。要做到这一点，他们的 IAM 权限必须包括这两项：
+ 该资源类型的基本 SageMaker AI 创建权限。
+ `sagemaker:AddTags` 权限。

例如，要允许用户创建 SageMaker 训练作业并对其进行标记，则需要为`sagemaker:CreateTrainingJob`和授予权限`sagemaker:AddTags`。

**重要**  
允许 Amazon SageMaker Studio 或 Amazon SageMaker Studio Classic 创建亚马逊 SageMaker AI 资源的自定义 IAM 策略还必须授予向这些资源添加标签的权限。之所以需要为资源添加标签的权限，是因为 Studio 和 Studio Classic 会自动为创建的任何资源添加标签。如果 IAM 策略允许 Studio 和 Studio Classic 创建资源但不允许标记，则在尝试创建资源时可能会出现 AccessDenied “” 错误。  
[AWS 亚马逊 A SageMaker I 的托管策略](security-iam-awsmanpol.md)授予创建 SageMaker AI 资源的权限已经包括在创建这些资源时添加标签的权限。

管理员可将这些 IAM 权限附加到以下任一选项中：
+ AWS 为用户分配用户定义标签的 IAM 角色
+ Studio 或 Studio Classic 为 AWS 生成的标记使用的执行角色

有关创建和应用自定义 IAM 策略的说明，请参阅[创建 IAM 策略（管理控制台）](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create-console.html)。

**注意**  
通过搜索以开头的操作，可以在 [SageMaker API 文档](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Operations_Amazon_SageMaker_Service.html)中找到 SageMaker AI 资源创建操作列表`Create`。这些创建操作（例如`CreateTrainingJob`和`CreateEndpoint`）是创建新 SageMaker AI 资源的操作。

**为某些创建操作添加标签权限**

您可以通过在原始资源创建策略中附加 IAM 策略的方式，授予 `sagemaker:AddTags` 权限和限制。以下示例策略允许`sagemaker:AddTags`但仅限于某些 SageMaker AI 资源创建操作，例如`CreateTrainingJob`。

```
{
  "Sid": "AllowAddTagsForCreateOperations",
  "Effect": "Allow",
  "Action": [
    "sagemaker:AddTags"
  ],
  "Resource": "*",
  "Condition": {
    "StringEquals": {
      "sagemaker:TaggingAction": "CreateTrainingJob"
    }
  }
}
```

策略条件限制 `sagemaker:AddTags` 只能与特定的创建操作一起使用。在这种方法中，创建权限策略保持不变，而额外的策略则提供受限的 `sagemaker:AddTags` 访问权限。该条件将权限范围缩小到需要标记的创建操作，从而防止出现一揽子 `sagemaker:AddTags` 权限。这`sagemaker:AddTags`通过仅允许特定的 SageMaker AI 资源创建用例来实现最低权限。

**示例：在全局范围内允许标记权限，并将创建操作限制在域内**

在这个自定义 IAM 策略示例中，前两条语句说明了如何使用标记来跟踪资源创建。它允许对所有资源执行 `sagemaker:CreateModel` 操作，并在使用该操作时对这些资源进行标记。第三个语句演示了如何使用标签值来控制对资源的操作。在这种情况下，它会阻止创建任何标有特定域 ARN 的 SageMaker AI 资源，从而根据标签值限制访问权限。

具体而言：
+ 第一条语句允许对任何资源 (`*`) 执行 `CreateModel` 操作。
+ 第二条语句允许执行 `sagemaker:AddTags` 操作，但仅限于 `sagemaker:TaggingAction` 条件键等于 `CreateModel` 时。这就限制了 `sagemaker:AddTags` 操作只能用于标记新创建的模型。
+ 第三条语句拒绝对任何资源 (`Create*`) 执行任何 SageMaker AI 创建操作 (`*`)，但前提是该资源的标签`sagemaker:domain-arn`等于特定域 ARN，。`domain-arn`

```
{
   "Statement":[
      {
         "Effect":"Allow",
         "Action":[
            "sagemaker:CreateModel"
         ],
         "Resource":"*"
      },
      {
         "Effect":"Allow",
         "Action":[
            "sagemaker:AddTags"
         ],
         "Resource":"*",
         "Condition":{
            "String":{
               "sagemaker:TaggingAction":[
                  "CreateModel"
               ]
            }
         }
      },
      {
         "Sid":"IsolateDomain",
         "Effect":"Deny",
         "Resource":"*",
         "Action":[
            "sagemaker:Create*"
         ],
         "Condition":{
            "StringEquals":{
               "aws:ResourceTag/sagemaker:domain-arn":"domain-arn"
            }
         }
      }
   ]
}
```

## 通过可见性条件限制对可搜索资源的访问
<a name="limit-access-to-searchable-resources"></a>

使用可见性条件限制用户对 AWS 账户内特定已标记资源的访问权限。用户只能访问他们拥有权限的资源。用户在搜索资源时，可以将搜索结果限制在特定资源范围内。

您可能希望您的用户仅查看与特定 Amazon SageMaker Studio 或 Amazon Studio Classic 域名相关的资源并与之交互。 SageMaker 您可以使用可见性条件将其访问权限限制在单个域或多个域内。

```
{
    "Sid": "SageMakerApis",
    "Effect": "Allow",
    "Action": "sagemaker:Search", 
    "Resource": "*",
    "Condition": {
        "StringEquals": {
            "sagemaker:SearchVisibilityCondition/Tags.sagemaker:example-domain-arn/EqualsIfExists": "arn:aws:sagemaker:AWS 区域:111122223333:domain/example-domain-1",
            "sagemaker:SearchVisibilityCondition/Tags.sagemaker:example-domain-arn/EqualsIfExists": "arn:aws:sagemaker:AWS 区域:111122223333:domain/example-domain-2"
        }
    }
}
```

可见性条件的一般格式为 `"sagemaker:SearchVisibilityCondition/Tags.key": "value"`。您可以提供任何标记资源的键值对。

```
{
   "MaxResults": number,
   "NextToken": "string",
   "Resource": "string", # Required Parameter
   "SearchExpression": { 
      "Filters": [ 
         { 
            "Name": "string",
            "Operator": "string",
            "Value": "string"
         }
      ],
      "NestedFilters": [ 
         { 
            "Filters": [ 
               { 
                  "Name": "string",
                  "Operator": "string",
                  "Value": "string"
               }
            ],
            "NestedPropertyName": "string"
         }
      ],
      "Operator": "string",
      "SubExpressions": [ 
         "SearchExpression"
      ]
   },
   "IsCrossAccount": "string",
   "VisibilityConditions" : [ List of conditions for visibility
         {"Key": "Tags.sagemaker:example-domain-arn", "Value": "arn:aws:sagemaker:AWS 区域:111122223333:domain/example-domain-1"},
         {"Key": "Tags.sagemaker:example-domain-arn", "Value": "arn:aws:sagemaker:AWS 区域:111122223333:domain/example-domain-2"}
]
   ],
   "SortBy": "string",
   "SortOrder": "string"
}
```

其中的可见性条件与策略中指定的 `"sagemaker:SearchVisibilityCondition/Tags.key": "value"` 格式相同。用户可以指定用于任何标记资源的键值对。

如果用户在[搜索](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Search.html)请求中包含 `VisibilityConditions` 参数，但适用于该用户的访问策略不包含在 `VisibilityConditions` 中指定的任何匹配条件键，则 `Search` 请求仍被允许并将运行。

如果用户的[搜索](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Search.html) API 请求未指定 `VisibilityConditions` 参数，但适用于该用户的访问策略包含与 `VisibilityConditions` 相关的条件键，则该用户的 `Search` 请求将被拒绝。

# 防止跨服务混淆代理
<a name="security-confused-deputy-prevention"></a>

[混淆代理问题](https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy)是一个安全问题，即没有执行操作权限的实体可能会迫使更具权限的实体执行该操作。在中 AWS，由于跨服务模仿，可能会出现混乱的副手问题。当一个服务（*调用服务*）调用另一个服务（*被调用服务*），并利用被调用服务的高级权限对调用服务无权访问的资源采取行动时，就会发生跨服务冒充。为了防止通过混乱的副手问题进行未经授权的访问， AWS 提供了一些工具来帮助保护您的跨服务数据。这些工具可帮助您控制授予服务主体的权限，限制他们只能访问您账户中必要的资源。通过仔细管理服务主体的访问权限，可以帮助降低服务不当访问其不应有权限的数据或资源的风险。

请继续阅读以获取一般指导或浏览特定 A SageMaker I 功能的示例：

**Topics**
+ [使用全局条件键限制权限](#security-confused-deputy-context-keys)
+ [SageMaker 边缘管理器](#security-confused-deputy-edge-manager)
+ [SageMaker 图片](#security-confused-deputy-images)
+ [SageMaker AI 推理](#security-confused-deputy-inference)
+ [SageMaker AI Batch 转换作业](#security-confused-deputy-batch)
+ [SageMaker 人工智能市场](#security-confused-deputy-marketplace)
+ [SageMaker Neo](#security-confused-deputy-neo)
+ [SageMaker 管道](#security-confused-deputy-pipelines)
+ [SageMaker 处理作业](#security-confused-deputy-processing-job)
+ [SageMaker 工作室](#security-confused-deputy-studio)
+ [SageMaker 培训职位](#security-confused-deputy-training-job)

## 使用全局条件键限制权限
<a name="security-confused-deputy-context-keys"></a>

我们建议在资源策略中使用`[aws:SourceArn](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourcearn)`和`[aws:SourceAccount](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceaccount)`全局条件密钥来限制 Amazon A SageMaker I 为其他服务提供的资源的权限。如果同时使用全局条件键和包含账户 ID 的 `aws:SourceArn` 值，则 `aws:SourceAccount` 值和 `aws:SourceArn` 值中的账户在同一策略语句中使用时，必须使用相同的账户 ID。如果您只希望将一个资源与跨服务访问相关联，请使用。`aws:SourceArn`如果您想允许该账户中的任何资源与跨服务使用操作相关联，请使用。`aws:SourceAccount`

防范混淆代理问题的有效方法是使用 `aws:SourceArn` 全局条件键和资源的完整 ARN。如果您不知道资源的完整 ARN，或者您正在指定多个资源，请针对 ARN 未知部分使用带有通配符 (`*`) 的 `aws:SourceArn` 全局条件键。例如 `arn:aws:sagemaker:*:123456789012:*`。

以下示例显示了如何在 SageMaker AI 中使用`aws:SourceArn`和`aws:SourceAccount`全局条件键来防止出现混乱的副手问题。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": {
    "Sid": "ConfusedDeputyPreventionExamplePolicy",
    "Effect": "Allow",
    "Principal": {
      "Service": "sagemaker.amazonaws.com"
    },
    "Action": "sagemaker:StartSession",
    "Resource": "arn:aws:sagemaker:us-east-1:123456789012:ResourceName/*",
    "Condition": {
      "ArnLike": {
        "aws:SourceArn": "arn:aws:sagemaker:us-east-1:123456789012:*"
      },
      "StringEquals": {
        "aws:SourceAccount": "123456789012"
      }
    }
  }
}
```

------

## SageMaker 边缘管理器
<a name="security-confused-deputy-edge-manager"></a>

以下示例显示了如何使用`aws:SourceArn`全局条件密钥来防止 SageMaker Edge Manager 的跨服务混淆代理问题，该问题是由该*us-west-2*区域*123456789012*的账号造成的。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": {
      "Effect": "Allow",
      "Principal": { "Service": "sagemaker.amazonaws.com" },
      "Action": "sts:AssumeRole",
      "Condition": {
        "ArnLike": {
          "aws:SourceArn": "arn:aws:sagemaker:us-west-2:123456789012:*"
      }
    }
  }
}
```

------

您可以将此模板中的 `aws:SourceArn` 替换为特定打包作业的完整 ARN，以进一步限制权限。

## SageMaker 图片
<a name="security-confused-deputy-images"></a>

以下示例显示了如何使用`aws:SourceArn`全局条件键来防止 I [SageMaker mages](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-byoi.html) 出现跨服务混淆副手问题。将此模板与 `[Image](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Image.html)` 或 `[ImageVersion](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ImageVersion.html)` 一起使用。此示例使用带有账号的`ImageVersion`记录 ARN。*123456789012*请注意，由于账号是 `aws:SourceArn` 值的一部分，因此您无需指定 `aws:SourceAccount` 值。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": {
        "Effect": "Allow",
        "Principal": {
            "Service": "sagemaker.amazonaws.com"
        },
        "Action": "sts:AssumeRole",
        "Condition": {
            "ArnLike": {
            "aws:SourceArn": "arn:aws:sagemaker:us-east-2:123456789012:image-version/*"
            }
        }
    }
}
```

------

请勿将此模板中的 `aws:SourceArn` 替换为特定映像或映像版本的完整 ARN。ARN 必须采用上面提供的格式，并指定 `image` 或 `image-version`。`partition`占位符应指定 AWS 商业分区 (`aws`) 或中国分区 (`aws-cn`)，具体取决于映像或镜像版本的运行位置。 AWS 同样，ARN 中的`region`占位符可以是[任何有图片可用的有效](https://docs.aws.amazon.com/sagemaker/latest/dg/regions-quotas.html) SageMaker 区域。

## SageMaker AI 推理
<a name="security-confused-deputy-inference"></a>

以下示例显示了如何使用`aws:SourceArn`全局条件键来防止 SageMaker AI [实时](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints)、[无服务器](https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints)和[异步](https://docs.aws.amazon.com/sagemaker/latest/dg/async-inference)推理的跨服务混淆代理问题。请注意，由于账号是 `aws:SourceArn` 值的一部分，因此您无需指定 `aws:SourceAccount` 值。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": {
    "Effect": "Allow",
    "Principal": { "Service": "sagemaker.amazonaws.com" },
    "Action": "sts:AssumeRole",
    "Condition": {
      "ArnLike": {
        "aws:SourceArn": "arn:aws:sagemaker:us-west-2:123456789012:*"
      }
    }
  }
}
```

------

请勿将此模板中的 `aws:SourceArn` 替换为特定模型或端点的完整 ARN。ARN 必须采用上面提供的格式。ARN 模板中的星号不代表通配符，不应更改。

## SageMaker AI Batch 转换作业
<a name="security-confused-deputy-batch"></a>

以下示例显示了如何使用`aws:SourceArn`全局条件密钥来防止由该*us-west-2*地区账号创建的 SageMaker AI [批量转换作业](https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html)出现跨服务混淆*123456789012*的代理问题。请注意，由于账号在 ARN 中，因此无需指定 `aws:SourceAccount` 值。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "sagemaker.amazonaws.com"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "ArnLike": {
          "aws:SourceArn": "arn:aws:sagemaker:us-west-2:123456789012:transform-job/*"
        }
      }
    }
  ]
}
```

------

您可以将此模板中的 `aws:SourceArn` 替换为特定批量转换作业的完整 ARN，以进一步限制权限。

## SageMaker 人工智能市场
<a name="security-confused-deputy-marketplace"></a>

以下示例显示了如何使用`aws:SourceArn`全局条件密钥来防止由该*us-west-2*地区账号*123456789012*创建的 SageMaker AI Marketplace 资源出现跨服务混淆代理问题。请注意，由于账号在 ARN 中，因此无需指定 `aws:SourceAccount` 值。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "sagemaker.amazonaws.com"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "ArnLike": {
          "aws:SourceArn": "arn:aws:sagemaker:us-west-2:123456789012:*"
        }
      }
    }
  ]
}
```

------

请勿将此模板中的 `aws:SourceArn` 替换为特定算法或模型包的完整 ARN。ARN 必须采用上面提供的格式。ARN 模板中的星号确实代表通配符，涵盖了验证步骤中的所有训练作业、模型和批量转换作业，以及发布到 AI Marketplace 的算法和模型包。 SageMaker 

## SageMaker Neo
<a name="security-confused-deputy-neo"></a>

以下示例显示了如何使用`aws:SourceArn`全局条件密钥来防止由该*us-west-2*地区账号创建的 SageMaker Neo 编译任务出现跨服务混淆*123456789012*的代理问题。请注意，由于账号在 ARN 中，因此无需指定 `aws:SourceAccount` 值。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "sagemaker.amazonaws.com"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "ArnLike": {
          "aws:SourceArn": "arn:aws:sagemaker:us-west-2:123456789012:compilation-job/*"
        }
      }
    }
  ]
}
```

------

您可以将此模板中的 `aws:SourceArn` 替换为特定编译作业的完整 ARN，以进一步限制权限。

## SageMaker 管道
<a name="security-confused-deputy-pipelines"></a>

以下示例显示了如何使用`aws:SourceArn`全局条件键来防止使用来自一个或多个管道的管道执行记录的[SageMaker 管](https://docs.aws.amazon.com/sagemaker/latest/dg/pipelines-overview.html)道出现跨服务混淆副手问题。请注意，由于账号在 ARN 中，因此无需指定 `aws:SourceAccount` 值。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "sagemaker.amazonaws.com"
            },
            "Action": "sts:AssumeRole",
            "Condition": {
                "ArnLike": {
                    "aws:SourceArn": "arn:aws:sagemaker:us-east-1:123456789012:pipeline/mypipeline/*"
                }
            }
        }
    ]
}
```

------

请勿将此模板中的 `aws:SourceArn` 替换为特定管道执行的完整 ARN。ARN 必须采用上面提供的格式。`partition`占位符应指定 AWS 商业分区 (`aws`) 或中国分区 (`aws-cn`)，具体取决于管道的运行位置。 AWS 同样，ARN 中的`region`占位符可以是[任何可用管道的有效](https://docs.aws.amazon.com/sagemaker/latest/dg/regions-quotas.html) SageMaker 区域。

ARN 模板中的星号代表通配符，涵盖名为 `mypipeline` 的管道的所有管道执行。如果要允许账户 `123456789012` 中的所有管道而不是某个特定管道使用 `AssumeRole` 权限，则 `aws:SourceArn` 应为 `arn:aws:sagemaker:*:123456789012:pipeline/*`。

## SageMaker 处理作业
<a name="security-confused-deputy-processing-job"></a>

以下示例显示了如何使用`aws:SourceArn`全局条件键来防止 SageMaker 处理由该*us-west-2*地区账号创建的作业时出现跨服务混淆*123456789012*的代理问题。请注意，由于账号在 ARN 中，因此无需指定 `aws:SourceAccount` 值。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "sagemaker.amazonaws.com"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "ArnLike": {
          "aws:SourceArn": "arn:aws:sagemaker:us-west-2:123456789012:processing-job/*"
        }
      }
    }
  ]
}
```

------

您可以将此模板中的 `aws:SourceArn` 替换为特定处理作业的完整 ARN，以进一步限制权限。

## SageMaker 工作室
<a name="security-confused-deputy-studio"></a>

以下示例显示了如何使用`aws:SourceArn`全局条件密钥来防止 SageMaker Studio 出现跨服务混淆代理问题，该问题是由该*123456789012**us-west-2*地区的账号造成的。请注意，由于账号是 `aws:SourceArn` 值的一部分，因此您无需指定 `aws:SourceAccount` 值。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "sagemaker.amazonaws.com"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "ArnLike": {
          "aws:SourceArn": "arn:aws:sagemaker:us-west-2:123456789012:*"
        }
      }
    }
  ]
}
```

------

请勿将此模板中的 `aws:SourceArn` 替换为特定 Studio 应用程序、用户配置文件或域的完整 ARN。ARN 必须采用前面示例中提供的格式。ARN 模板中的星号不代表通配符，不应更改。

## SageMaker 培训职位
<a name="security-confused-deputy-training-job"></a>

以下示例显示了如何使用`aws:SourceArn`全局条件密钥来防止在 SageMaker 培训由该*us-west-2*地区账号创建的作业时出现跨服务混淆*123456789012*的代理问题。请注意，由于账号在 ARN 中，因此无需指定 `aws:SourceAccount` 值。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "sagemaker.amazonaws.com"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "ArnLike": {
          "aws:SourceArn": "arn:aws:sagemaker:us-west-2:123456789012:training-job/*"
        }
      }
    }
  ]
}
```

------

您可以将此模板中的 `aws:SourceArn` 替换为特定训练作业的完整 ARN，以进一步限制权限。

**后续步骤**  
有关管理执行角色的更多信息，请参阅 [SageMaker AI 角色](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles)。

# 如何使用 SageMaker AI 执行角色
<a name="sagemaker-roles"></a>

Amazon SageMaker AI 使用其他 AWS 服务代表您执行操作。您必须授予 SageMaker AI 权限才能使用这些服务及其操作的资源。您可以使用 AWS Identity and Access Management (IAM) 执行角色向 A SageMaker I 授予这些权限。有关 IAM 角色的更多信息，请参阅 [IAM 角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)。

要创建和使用执行角色，可以使用以下过程。

## 创建执行角色
<a name="sagemaker-roles-create-execution-role"></a>

使用以下过程创建一个执行角色，并附加 IAM 托管策略 `AmazonSageMakerFullAccess`。如果您的使用案例需要更精细的权限，请使用本页上的其他部分来创建满足业务需求的执行角色。您可以使用 SageMaker AI 控制台或创建执行角色 AWS CLI。

**重要**  
以下过程中使用的 IAM 管理策略 `AmazonSageMakerFullAccess` 只授予执行角色对名称中包含 `SageMaker`、`Sagemaker`、`sagemaker` 或 `aws-glue` 的存储桶或对象执行特定 Amazon S3 操作的权限。要了解如何为执行角色添加附加策略，以授予其访问其他 Amazon S3 存储桶和对象的权限，请参阅[向 A SageMaker I 执行角色添加其他 Amazon S3 权限](#sagemaker-roles-get-execution-role-s3)。

**注意**  
创建 A SageMaker I 域或笔记本实例时，您可以直接创建执行角色。  
有关如何创建 A SageMaker I 域的信息，请参阅[Amazon A SageMaker I 入门指南](gs.md)。
有关如何创建笔记本实例的信息，请参阅[为本教程创建 Amazon SageMaker 笔记本实例](gs-setup-working-env.md)。

**从 SageMaker AI 控制台创建新的执行角色**

1. 使用 [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/) 打开 IAM 控制台。

1. 选择 **Role (角色)**，然后选择 **Create role (创建角色)**。

1. 将**AWS 服务**保留为**可信实体类型**，然后使用向下箭头在**其他 AWS 服务的用例**中查找 **SageMaker AI**。

1. 选择 **SageMaker AI-执行**，然后选择**下一步**。

1. IAM 托管策略 `AmazonSageMakerFullAccess` 会自动附加到角色。要查看此策略中包含的权限，请选择策略名称旁边的加号 (**\$1**)。选择**下一步**。

1. 输入**角色名称**和**描述**。

1. （可选）向角色添加其他权限和标签。

1. 选择**创建角色**。

1. 在 IAM 控制台的**角色**部分中，找到刚刚创建的角色。如果需要，请通过文本框使用角色名称搜索角色。

1. 在角色摘要页面上，记下 ARN。

**从 AWS CLI创建新的执行角色**

在使用创建执行角色之前 AWS CLI，请务必按照中的说明对其进行更新和配置[（可选）配置 AWS CLI](gs-set-up.md#gs-cli-prereq)，然后继续按照中的说明进行操作[使用自定义设置 AWS CLI](onboard-custom.md#onboard-custom-instructions-cli)。

创建执行角色后，可以将其与 SageMaker AI 域、用户配置文件或 Jupyter 笔记本实例相关联。
+ 要了解如何将执行角色与现有 SageMaker AI 域相关联，请参阅[编辑域设置](domain-edit.md)。
+ 要了解如何将执行角色与现有用户配置文件进行关联，请参阅[添加用户配置文件](domain-user-profile-add.md)。
+ 要了解如何将执行角色与现有笔记本实例进行关联，请参阅[更新笔记本实例](nbi-update.md)。

您也可以将执行角色的 ARN 传递给 API 调用。例如，使用 [Amaz SageMaker on Python 软件开发工具包](https://sagemaker.readthedocs.io/en/stable)，您可以将执行角色的 ARN 传递给估算器。在下面的代码示例中，我们使用 XGBoost算法容器创建了一个估计器，并将执行角色的 ARN 作为参数传递。有关完整示例 GitHub，请参阅[客户流失预测](https://github.com/aws/amazon-sagemaker-examples/blob/89c54681b7e0f83ce137b34b879388cf5960af93/introduction_to_applying_machine_learning/xgboost_customer_churn/xgboost_customer_churn.ipynb)。 XGBoost

```
import sagemaker, boto3
from sagemaker import image_uris

sess = sagemaker.Session()
region = sess.boto_region_name
bucket = sess.default_bucket()
prefix = "sagemaker/DEMO-xgboost-churn"
container = sagemaker.image_uris.retrieve("xgboost", region, "1.7-1")

xgb = sagemaker.estimator.Estimator(
    container,
    execution-role-ARN,
    instance_count=1,
    instance_type="ml.m4.xlarge",
    output_path="s3://{}/{}/output".format(bucket, prefix),
    sagemaker_session=sess,
)

...
```

### 向 A SageMaker I 执行角色添加其他 Amazon S3 权限
<a name="sagemaker-roles-get-execution-role-s3"></a>

当您对 Amazon S3 中的资源（例如输入数据）使用 A SageMaker I 功能时，将使用您在请求中指定的执行角色（例如`CreateTrainingJob`）来访问这些资源。

如果您将 IAM 托管策略 `AmazonSageMakerFullAccess` 附加到一个执行角色，则该角色有权对名称中包含 `SageMaker`、`Sagemaker`、`sagemaker` 或 `aws-glue` 的存储桶或对象执行某些 Amazon S3 操作。它还有权对任何 Amazon S3 资源执行以下操作：

```
"s3:CreateBucket", 
"s3:GetBucketLocation",
"s3:ListBucket",
"s3:ListAllMyBuckets",
"s3:GetBucketCors",
"s3:PutBucketCors"
```

要向执行角色授予访问 Amazon S3 中一个或多个特定存储桶的权限，您可以为该角色附加类似于以下内容的策略。此策略授予 IAM 角色执行 `AmazonSageMakerFullAccess` 允许的所有操作的权限，但限制其只能访问 amzn-s3-demo-bucket1 和 amzn-s3-demo-bucket2 这两个存储桶。请参阅您正在使用的特定 SageMaker AI 功能的安全文档，详细了解该功能所需的 Amazon S3 权限。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject",
                "s3:AbortMultipartUpload"
            ],
            "Resource": [
                "arn:aws:s3:::amzn-s3-demo-bucket1/*",
                "arn:aws:s3:::amzn-s3-demo-bucket2/*"
            ]
        }, 
        {
            "Effect": "Allow",
            "Action": [
                "s3:CreateBucket",
                "s3:GetBucketLocation",
                "s3:ListBucket",
                "s3:ListAllMyBuckets",
                "s3:GetBucketCors",
                "s3:PutBucketCors"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetBucketAcl",
                "s3:PutObjectAcl"
            ],
            "Resource": [
                "arn:aws:s3:::amzn-s3-demo-bucket1",
                "arn:aws:s3:::amzn-s3-demo-bucket2"
            ]
        }
    ]
}
```

------

## 获取执行角色
<a name="sagemaker-roles-get-execution-role"></a>

您可以使用 [SageMaker AI 控制台](https://console.aws.amazon.com/sagemaker)、A [maz SageMaker on Python 软件开发工具包](https://sagemaker.readthedocs.io/en/stable)或[AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html)来检索附加到 SageMaker AI 域、空间或用户资料的执行角色的 ARN 和名称。

**Topics**
+ [获取域执行角色](#sagemaker-roles-get-execution-role-domain)
+ [获取空间执行角色](#sagemaker-roles-get-execution-role-space)
+ [获取用户执行角色](#sagemaker-roles-get-execution-role-user)

### 获取域执行角色
<a name="sagemaker-roles-get-execution-role-domain"></a>

下面提供了查找域执行角色的说明。

#### 获取域执行角色（管理控制台）
<a name="sagemaker-roles-get-execution-role-domain-console"></a>

**查找域中的执行角色**

1. 打开 A SageMaker I 控制台，[https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/)

1. 在左侧导航窗格中，选择**管理员配置**下的**域**。

1. 选择与您的域相对应的链接。

1. 选择**域设置**选项卡。

1. 在**常规设置**部分，执行角色 ARN 列在**执行角色**下。

   执行角色名称位于执行角色 ARN 中最后一个 `/` 之后。

### 获取空间执行角色
<a name="sagemaker-roles-get-execution-role-space"></a>

下面提供了查找空间执行角色的说明。

#### 获取空间执行角色
<a name="sagemaker-roles-get-execution-role-space-console"></a>

**查找与您的空间相关的执行角色**

1. 打开 A SageMaker I 控制台，[https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/)

1. 在左侧导航窗格中，选择**管理员配置**下的**域**。

1. 选择与您的域相对应的链接。

1. 选择**空间管理**选项卡。

1. 在**详情**部分，执行角色 ARN 列在**执行角色**下。

   执行角色名称位于执行角色 ARN 中最后一个 `/` 之后。

#### 获取空间执行角色 (Python SDK)
<a name="sagemaker-roles-get-execution-role-space-sdk"></a>

**注意**  
以下代码旨在在 SageMaker AI 环境中运行，就像 Amazon SageMaker Studio IDEs 中的任何代码一样。如果您在 SageMaker AI 环境`get_execution_role`之外运行，则会收到错误消息。

以下 [https://sagemaker.readthedocs.io/en/stable/api/utility/session.html#sagemaker.session.get_execution_role](https://sagemaker.readthedocs.io/en/stable/api/utility/session.html#sagemaker.session.get_execution_role)[Amaz SageMaker on Python 软件开发工具包](https://sagemaker.readthedocs.io/en/stable)命令检索附加到空间的执行角色的 ARN。

```
from sagemaker import get_execution_role
role = get_execution_role()
print(role)
```

执行角色名称位于执行角色 ARN 中最后一个 `/` 之后。

### 获取用户执行角色
<a name="sagemaker-roles-get-execution-role-user"></a>

下面提供了查找用户执行角色的说明。

#### 获取用户执行角色（管理控制台）
<a name="sagemaker-roles-get-execution-role-user-console"></a>

**查找用户的执行角色**

1. 打开 A SageMaker I 控制台，[https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/)

1. 在左侧导航窗格中，选择**管理员配置**下的**域**。

1. 选择与您的域相对应的链接。

1. 选择**用户配置文件**选项卡。

1. 选择与用户对应的链接。

1. 在**详情**部分，执行角色 ARN 列在**执行角色**下。

   执行角色名称位于执行角色 ARN 中最后一个 `/` 之后。

#### 获取空间执行角色 (AWS CLI)
<a name="sagemaker-roles-get-execution-role-user-cli"></a>

**注意**  
要使用以下示例，必须安装并配置 AWS Command Line Interface (AWS CLI)。有关信息，请参阅*版本 2 AWS Command Line Interface 用户指南*中的[AWS CLI入门](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)。

以下 [https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sts/get-caller-identity.html](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sts/get-caller-identity.html) AWS CLI 命令将显示有关用于验证请求的 IAM 身份的信息。调用者是 IAM 用户。

```
aws sts get-caller-identity
```

执行角色名称位于执行角色 ARN 中最后一个 `/` 之后。

## 更改您的执行角色
<a name="sagemaker-roles-change-execution-role"></a>

执行角色是 A SageMaker I 身份（例如 A SageMaker I 用户、空间或域）担任的 IAM 角色。更改 IAM 角色会更改承担该角色的所有身份的权限。

更改执行角色后，相应空间的执行角色也会随之更改。变化的影响可能需要一些时间来传播。
+ 更改*用户的执行角色*后，由该用户创建的*专用空间*将承担更改后的执行角色。
+ 更改*空间的默认执行角色*后，域中的*共享空间*将承担更改后的执行角色。

有关执行角色和空间的更多信息，请参阅 [了解域空间权限和执行角色](execution-roles-and-spaces.md)。

您可以使用以下指令之一将身份的执行角色更改为不同的 IAM 角色。

如果您想*修改*某个身份所承担的角色，请参阅 [修改执行角色（管理控制台）的权限](#sagemaker-roles-modify-to-execution-role)。

**Topics**
+ [更改域默认执行角色](#sagemaker-roles-change-execution-role-domain)
+ [更改空间默认执行角色](#sagemaker-roles-change-execution-role-space)
+ [更改用户配置文件执行角色](#sagemaker-roles-change-execution-role-user)

### 更改域默认执行角色
<a name="sagemaker-roles-change-execution-role-domain"></a>

下面提供了更改域默认执行角色的说明。

#### 更改域默认执行角色（管理控制台）
<a name="sagemaker-roles-change-execution-role-domain-console"></a>

**更改域的默认执行角色**

1. 打开 A SageMaker I 控制台，[https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/)

1. 在左侧导航窗格中，选择**管理员配置**下的**域**。

1. 选择与您的域相对应的链接。

1. 选择**域设置**选项卡。

1. 在**常规设置**部分，选择**编辑**。

1. 在**权限**部分，在**默认执行角色**下展开下拉列表。

1. 在下拉列表中，您可以选择现有角色、输入自定义 IAM 角色 ARN 或创建新角色。

   如果要创建新角色，可以选择**创建角色向导**选项。

1. 在以下步骤中选择下一步，并在最后一步选择提交。

### 更改空间默认执行角色
<a name="sagemaker-roles-change-execution-role-space"></a>

下面提供了更改空间默认执行角色的说明。更改此执行角色将改变域中所有共享空间所承担的角色。

#### 更改空间默认执行角色（管理控制台）
<a name="sagemaker-roles-change-execution-role-space-console"></a>

**创建新空间时更改空间默认执行角色**

1. 打开 A SageMaker I 控制台，[https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/)

1. 在左侧导航窗格中，选择**管理员配置**下的**域**。

1. 选择与您的域相对应的链接。

1. 选择**域设置**选项卡。

1. 在**常规设置**部分，选择**编辑**。

1. 在**权限**部分，在**空间默认执行角色**下展开下拉列表。

1. 在下拉列表中，您可以选择现有角色、输入自定义 IAM 角色 ARN 或创建新角色。

   如果要创建新角色，可以选择**创建角色向导**选项。

1. 在以下步骤中选择**下一步**，并在最后一步选择**提交**。

### 更改用户配置文件执行角色
<a name="sagemaker-roles-change-execution-role-user"></a>

下面提供了更改用户执行角色的说明。更改此执行角色将改变该用户创建的所有专用空间所承担的角色。

#### 更改用户配置文件执行角色（管理控制台）
<a name="sagemaker-roles-change-execution-role-user-console"></a>

**更改用户的执行角色**

1. 打开 A SageMaker I 控制台，[https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/)

1. 在左侧导航窗格中，选择**管理员配置**下的**域**。

1. 选择与您的域相对应的链接。

1. 选择**用户配置文件**选项卡。

1. 选择与用户配置文件名称相对应的链接。

1. 选择**编辑**。

1. 在下拉列表中，您可以选择现有角色、输入自定义 IAM 角色 ARN 或创建新角色。

   如果要创建新角色，可以选择**创建角色向导**选项。

1. 在以下步骤中选择**下一步**，并在最后一步选择**提交**。

## 修改执行角色（管理控制台）的权限
<a name="sagemaker-roles-modify-to-execution-role"></a>

您可以修改身份（例如 SageMaker AI 用户、空间或域）执行角色的现有权限。具体做法是找到身份所承担的适当 IAM 角色，然后修改该 IAM 角色。下面将说明如何通过管理控制台实现这一功能。

修改执行角色后，相应空间的执行角色也会随之改变。变化的影响可能不会立竿见影。
+ 修改*用户的执行角色*后，由该用户创建的*专用空间*将承担修改后的执行角色。
+ 修改*空间的默认执行角色*后，域中的*共享空间*将承担修改后的执行角色。

有关执行角色和空间的更多信息，请参阅 [了解域空间权限和执行角色](execution-roles-and-spaces.md)。

如果您想*更改*某个身份所承担的角色，请参阅 [更改您的执行角色](#sagemaker-roles-change-execution-role)。

### 修改执行角色（管理控制台）的权限
<a name="sagemaker-roles-modify-to-execution-role-console"></a>

**修改执行角色的权限**

1. 首先获取要修改的身份名称。
   + [获取域执行角色](#sagemaker-roles-get-execution-role-domain)
   + [获取空间执行角色](#sagemaker-roles-get-execution-role-space)
   + [获取用户执行角色](#sagemaker-roles-get-execution-role-user)

1. 要修改身份所承担的角色，请参阅*《AWS Identity and Access Management 用户指南》*中的 [修改角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_modify.html)。

   有关向 IAM 身份添加权限的更多信息和说明，请参阅*《AWS Identity and Access Management 用户指南》*中的[添加或删除身份权限](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-attach-detach.html)。

## 传递角色
<a name="sagemaker-roles-pass-role"></a>

诸如在服务之间传递角色之类的操作是 A SageMaker I 中的常见功能。您可以在《*服务授权参考*》中找到有关 [ SageMaker AI 的操作、资源和条件密钥](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemaker.html#amazonsagemaker-actions-as-permissions)的更多详细信息。

在调用这些 API 时，您需要传递角色 (`iam:PassRole`)：[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAutoMLJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAutoMLJob.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateCompilationJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateCompilationJob.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateDomain.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateDomain.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateFeatureGroup.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateFeatureGroup.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateFlowDefinition.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateFlowDefinition.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateHyperParameterTuningJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateHyperParameterTuningJob.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateImage.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateImage.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateMonitoringSchedule.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateMonitoringSchedule.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateNotebookInstance.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateNotebookInstance.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateUserProfile.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateUserProfile.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_RenderUiTemplate.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_RenderUiTemplate.html)、[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateImage.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateImage.html) 以及 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateNotebookInstance.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateNotebookInstance.html)。

您将以下信任策略附加到 IAM 角色，该策略授予 A SageMaker I 委托人担任该角色的权限，所有执行角色的信任策略都相同：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "sagemaker.amazonaws.com"
            },
            "Action": "sts:AssumeRole"
        }
    ]
}
```

------

您需要授予该角色的权限有所不同，具体取决于您所调用的 API。以下几节解释了这些权限。

**注意**  
您可以使用 AWS-managed 权限策略，而不是通过制定权限策略来管理`AmazonSageMakerFullAccess`权限。此策略中的权限相当广泛，允许您在 SageMaker AI 中执行任何可能要执行的操作。有关此策略的列表，包括有关添加许多权限的原因的信息，请参阅 [AWS 托管策略： AmazonSageMakerFullAccess](security-iam-awsmanpol.md#security-iam-awsmanpol-AmazonSageMakerFullAccess)。如果您更愿意创建自定义策略和管理权限以将权限限定于您需要使用执行角色执行的操作，请参阅以下主题。

**重要**  
如果您遇到问题，请参阅 [对 Amazon SageMaker AI 身份和访问进行故障排除](security_iam_troubleshoot.md)。

有关 IAM 角色的更多信息，请参阅*服务授权参考*中的 [IAM 角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)。

**Topics**
+ [创建执行角色](#sagemaker-roles-create-execution-role)
+ [获取执行角色](#sagemaker-roles-get-execution-role)
+ [更改您的执行角色](#sagemaker-roles-change-execution-role)
+ [修改执行角色（管理控制台）的权限](#sagemaker-roles-modify-to-execution-role)
+ [传递角色](#sagemaker-roles-pass-role)
+ [CreateAutoMLJob 和 CreateAuto MLJob V2 API：执行角色权限](#sagemaker-roles-autopilot-perms)
+ [CreateDomain API：执行角色权限](#sagemaker-roles-createdomain-perms)
+ [CreateImage 和 UpdateImage APIs：执行角色权限](#sagemaker-roles-createimage-perms)
+ [CreateNotebookInstance API：执行角色权限](#sagemaker-roles-createnotebookinstance-perms)
+ [CreateHyperParameterTuningJob API：执行角色权限](#sagemaker-roles-createhyperparametertiningjob-perms)
+ [CreateProcessingJob API：执行角色权限](#sagemaker-roles-createprocessingjob-perms)
+ [CreateTrainingJob API：执行角色权限](#sagemaker-roles-createtrainingjob-perms)
+ [CreateModel API：执行角色权限](#sagemaker-roles-createmodel-perms)
+ [SageMaker 地理空间功能角色](sagemaker-geospatial-roles.md)

## CreateAutoMLJob 和 CreateAuto MLJob V2 API：执行角色权限
<a name="sagemaker-roles-autopilot-perms"></a>

对于可以在 `CreateAutoMLJob` 或 `CreateAutoMLJobV2` API 请求中传递的执行角色，可以为该角色附加以下最低权限策略。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "iam:PassRole"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": "sagemaker.amazonaws.com"
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "sagemaker:DescribeEndpointConfig",
                "sagemaker:DescribeModel",
                "sagemaker:InvokeEndpoint",
                "sagemaker:ListTags",
                "sagemaker:DescribeEndpoint",
                "sagemaker:CreateModel",
                "sagemaker:CreateEndpointConfig",
                "sagemaker:CreateEndpoint",
                "sagemaker:DeleteModel",
                "sagemaker:DeleteEndpointConfig",
                "sagemaker:DeleteEndpoint",
                "cloudwatch:PutMetricData",
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:CreateLogGroup",
                "logs:DescribeLogStreams",
                "s3:GetObject",
                "s3:PutObject",
                "s3:ListBucket",
                "ecr:GetAuthorizationToken",
                "ecr:BatchCheckLayerAvailability",
                "ecr:GetDownloadUrlForLayer",
                "ecr:BatchGetImage"
            ],
            "Resource": "*"
        }
    ]
}
```

------

如果您为 AutoML 作业指定一个私有 VPC，请添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
        "ec2:CreateNetworkInterface",
        "ec2:CreateNetworkInterfacePermission",
        "ec2:DeleteNetworkInterface",
        "ec2:DeleteNetworkInterfacePermission",
        "ec2:DescribeNetworkInterfaces",
        "ec2:DescribeVpcs",
        "ec2:DescribeDhcpOptions",
        "ec2:DescribeSubnets",
        "ec2:DescribeSecurityGroups"
    ]
}
```

如果您的输入使用服务器端加密和 KMS AWS 托管密钥 (SSE-KMS) 进行加密，请添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
        "kms:Decrypt"
    ]
}
```

如果在 AutoML 作业的输出配置中指定一个 KMS 密钥，则添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
    "kms:Encrypt"
    ]
}
```

如果在 AutoML 作业的资源配置中指定一个批量 KMS 密钥，则添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
    "kms:CreateGrant"
    ]
}
```

## CreateDomain API：执行角色权限
<a name="sagemaker-roles-createdomain-perms"></a>

当您在 `CreateDomain` API 请求中传递 AWS KMS 客户托管密钥时，具有 IAM Identity Center 的域的执行 user/execution 角色和 IAM 域`KmsKeyId`的角色需要以下权限。将在 `CreateApp` API 调用期间强制执行这些权限。

对于可在 `CreateDomain` API 请求中传递的执行角色，您可以将以下权限策略附加到该角色：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "kms:CreateGrant",
                "kms:DescribeKey"
            ],
            "Resource": "arn:aws:kms:us-east-1:111122223333:key/kms-key-id"
        }
    ]
}
```

------

或者，如果在 KMS 策略中指定了权限，则可以将以下策略附加到该角色：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "Allow use of the key",
            "Effect": "Allow",
            "Principal": {
                "AWS": [
                    "arn:aws:iam::111122223333:role/ExecutionRole"
                ]
            },
            "Action": [
                "kms:CreateGrant",
                "kms:DescribeKey"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## CreateImage 和 UpdateImage APIs：执行角色权限
<a name="sagemaker-roles-createimage-perms"></a>

对于可在 `CreateImage` 或 `UpdateImage` API 请求中传递的执行角色，您可以将以下权限策略附加到该角色：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "ecr:BatchGetImage",
                "ecr:GetDownloadUrlForLayer"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## CreateNotebookInstance API：执行角色权限
<a name="sagemaker-roles-createnotebookinstance-perms"></a>

您向执行角色授予调用 `CreateNotebookInstance` API 的权限取决于您计划对笔记本实例执行的操作。如果您计划在调用 APIs 和时使用它来调用 SageMaker AI `CreateTrainingJob` 并传递相同的角色 `CreateModel` APIs，请将以下权限策略附加到该角色：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "sagemaker:*",
                "ecr:GetAuthorizationToken",
                "ecr:GetDownloadUrlForLayer",
                "ecr:BatchGetImage",
                "ecr:BatchCheckLayerAvailability",
                "ecr:SetRepositoryPolicy",
                "ecr:CompleteLayerUpload",
                "ecr:BatchDeleteImage",
                "ecr:UploadLayerPart",
                "ecr:DeleteRepositoryPolicy",
                "ecr:InitiateLayerUpload",
                "ecr:DeleteRepository",
                "ecr:PutImage",
                "ecr:CreateRepository",
                "cloudwatch:PutMetricData",
                "cloudwatch:GetMetricData",
                "cloudwatch:GetMetricStatistics",
                "cloudwatch:ListMetrics",
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:DescribeLogStreams",
                "logs:PutLogEvents",
                "logs:GetLogEvents",
                "s3:CreateBucket",
                "s3:ListBucket",
                "s3:GetBucketLocation",
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject",
                "robomaker:CreateSimulationApplication",
                "robomaker:DescribeSimulationApplication",
                "robomaker:DeleteSimulationApplication",
                "robomaker:CreateSimulationJob",
                "robomaker:DescribeSimulationJob",
                "robomaker:CancelSimulationJob",
                "ec2:CreateVpcEndpoint",
                "ec2:DescribeRouteTables",
                "elasticfilesystem:DescribeMountTargets"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "codecommit:GitPull",
                "codecommit:GitPush"
            ],
            "Resource": [
                "arn:aws:codecommit:*:*:*sagemaker*",
                "arn:aws:codecommit:*:*:*SageMaker*",
                "arn:aws:codecommit:*:*:*Sagemaker*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "iam:PassRole"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": "sagemaker.amazonaws.com"
                }
            }
        }
    ]
}
```

------

要收紧权限，请限制 `"Resource": "*"` 以使权限仅限于特定的 Amazon S3 和 Amazon ECR 资源，如下所示：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "sagemaker:*",
                "ecr:GetAuthorizationToken",
                "cloudwatch:PutMetricData",
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:DescribeLogStreams",
                "logs:PutLogEvents",
                "logs:GetLogEvents"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "iam:PassRole"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": "sagemaker.amazonaws.com"
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::inputbucket"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject"
            ],
            "Resource": [
                "arn:aws:s3:::inputbucket/object1",
                "arn:aws:s3:::outputbucket/path",
                "arn:aws:s3:::inputbucket/object2",
                "arn:aws:s3:::inputbucket/object3"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "ecr:BatchCheckLayerAvailability",
                "ecr:GetDownloadUrlForLayer",
                "ecr:BatchGetImage"
            ],
            "Resource": [
                "arn:aws:ecr:us-east-1:111122223333:repository/my-repo1",
                "arn:aws:ecr:us-east-1:111122223333:repository/my-repo2",
                "arn:aws:ecr:us-east-1:111122223333:repository/my-repo3"
            ]
        }
    ]
}
```

------

如果您计划访问其他资源（如 Amazon DynamoDB 或 Amazon Relational Database Service），则向此策略添加相关权限。

在上一个策略中，您按如下方式确定策略范围：
+ 仅向您在 `s3:ListBucket` 请求中指定作为 `InputDataConfig.DataSource.S3DataSource.S3Uri` 的特定存储桶授予 `CreateTrainingJob` 权限。
+ 按如下方式确定 `s3:GetObject `、`s3:PutObject` 和 `s3:DeleteObject` 的权限范围：
  + 将范围限定为您在 `CreateTrainingJob` 请求中指定的以下值：

    `InputDataConfig.DataSource.S3DataSource.S3Uri`

    `OutputDataConfig.S3OutputPath`
  + 将范围限定为您在 `CreateModel` 请求中指定的以下值：

    `PrimaryContainer.ModelDataUrl`

    `SuplementalContainers.ModelDataUrl`
+ 按如下方式确定 `ecr` 权限的范围：
  + 将范围限定为您在 `AlgorithmSpecification.TrainingImage` 请求中指定的 `CreateTrainingJob` 值。
  + 将范围限定为您在 `PrimaryContainer.Image` 请求中指定的 `CreateModel` 值：

`cloudwatch` 和 `logs` 操作适用于“\$1”资源。有关更多信息，请参阅 Amazon CloudWatch 用户指南中的[CloudWatch 资源和操作](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/iam-access-control-overview-cw.html#CloudWatch_ARN_Format)。



## CreateHyperParameterTuningJob API：执行角色权限
<a name="sagemaker-roles-createhyperparametertiningjob-perms"></a>

对于可在 `CreateHyperParameterTuningJob` API 请求中传递的执行角色，您可以将以下权限策略附加到该角色：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricData",
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:CreateLogGroup",
                "logs:DescribeLogStreams",
                "s3:GetObject",
                "s3:PutObject",
                "s3:ListBucket",
                "ecr:GetAuthorizationToken",
                "ecr:BatchCheckLayerAvailability",
                "ecr:GetDownloadUrlForLayer",
                "ecr:BatchGetImage"
            ],
            "Resource": "*"
        }
    ]
}
```

------

您可以将这些权限的范围限定为特定的 Amazon S3、Amazon ECR 和 Amazon L CloudWatch ogs 资源，而不必指定`"Resource": "*"`：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricData",
                "ecr:GetAuthorizationToken"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::inputbucket"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": [
                "arn:aws:s3:::inputbucket/object",
                "arn:aws:s3:::outputbucket/path"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "ecr:BatchCheckLayerAvailability",
                "ecr:GetDownloadUrlForLayer",
                "ecr:BatchGetImage"
            ],
            "Resource": "arn:aws:ecr:us-east-1:111122223333:repository/my-repo"
        },
        {
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:CreateLogGroup",
                "logs:DescribeLogStreams"
            ],
            "Resource": "arn:aws:logs:us-east-1:111122223333:log-group:/aws/sagemaker/TrainingJobs*"
        }
    ]
}
```

------

如果与超参数优化作业关联的训练容器需要访问其他数据源（如 DynamoDB 或 Amazon RDS 资源），则向此策略添加相关权限。

在上一个策略中，您按如下方式确定策略范围：
+ 仅向您在 `s3:ListBucket` 请求中指定作为 `InputDataConfig.DataSource.S3DataSource.S3Uri` 的特定存储桶授予 `CreateTrainingJob` 权限。
+ 仅向您在 `s3:GetObject ` 请求的输入和输出数据配置中指定的以下对象授予 `s3:PutObject`和 `CreateHyperParameterTuningJob` 权限：

  `InputDataConfig.DataSource.S3DataSource.S3Uri`

  `OutputDataConfig.S3OutputPath`
+ 仅向您在 `CreateHyperParameterTuningJob` 请求中指定的注册表路径 (`AlgorithmSpecification.TrainingImage`) 授予 Amazon ECR 权限。
+ 将 Amazon Lo CloudWatch gs 权限范围限定为记录一组 SageMaker 训练作业。

`cloudwatch` 操作适用于“\$1”资源。有关更多信息，请参阅 Amazon CloudWatch 用户指南中的[ CloudWatch 资源和操作](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format)。

如果您为超参数优化作业指定一个私有 VPC，请添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
        "ec2:CreateNetworkInterface",
        "ec2:CreateNetworkInterfacePermission",
        "ec2:DeleteNetworkInterface",
        "ec2:DeleteNetworkInterfacePermission",
        "ec2:DescribeNetworkInterfaces",
        "ec2:DescribeVpcs",
        "ec2:DescribeDhcpOptions",
        "ec2:DescribeSubnets",
        "ec2:DescribeSecurityGroups"
    ]
}
```

如果您的输入使用服务器端加密和 KMS AWS 托管密钥 (SSE-KMS) 进行加密，请添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
        "kms:Decrypt"
    ]
}
```

如果在超参数优化作业的输出配置中指定一个 KMS 密钥，则添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
    "kms:Encrypt"
    ]
}
```

如果在超参数优化作业的资源配置中指定一个批量 KMS 密钥，则添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
    "kms:CreateGrant"
    ]
}
```

## CreateProcessingJob API：执行角色权限
<a name="sagemaker-roles-createprocessingjob-perms"></a>

对于可在 `CreateProcessingJob` API 请求中传递的执行角色，您可以将以下权限策略附加到该角色：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricData",
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:CreateLogGroup",
                "logs:DescribeLogStreams",
                "s3:GetObject",
                "s3:PutObject",
                "s3:ListBucket",
                "ecr:GetAuthorizationToken",
                "ecr:BatchCheckLayerAvailability",
                "ecr:GetDownloadUrlForLayer",
                "ecr:BatchGetImage"
            ],
            "Resource": "*"
        }
    ]
}
```

------

您无需指定 `"Resource": "*"`，而是可以将这些权限限制为特定的 Amazon S3 和 Amazon ECR 资源：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricData",
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:CreateLogGroup",
                "logs:DescribeLogStreams",
                "ecr:GetAuthorizationToken"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::inputbucket"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": [
                "arn:aws:s3:::inputbucket/object",
                "arn:aws:s3:::outputbucket/path"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "ecr:BatchCheckLayerAvailability",
                "ecr:GetDownloadUrlForLayer",
                "ecr:BatchGetImage"
            ],
            "Resource": "arn:aws:ecr:us-east-1:111122223333:repository/my-repo"
        }
    ]
}
```

------

如果 `CreateProcessingJob.AppSpecification.ImageUri` 需要访问其他数据源 (如 DynamoDB 或 Amazon RDS 资源)，则向此策略添加相关权限。

在上一个策略中，您按如下方式确定策略范围：
+ 仅向您在 `s3:ListBucket` 请求中指定作为 `ProcessingInputs` 的特定存储桶授予 `CreateProcessingJob` 权限。
+ 将 `s3:GetObject `和 `s3:PutObject` 权限的范围限定在 `CreateProcessingJob` 请求中要在 `ProcessingInputs` 和 `ProcessingOutputConfig` 中下载或上传的对象。
+ 仅向您在 `CreateProcessingJob` 请求中指定的注册表路径 (`AppSpecification.ImageUri`) 授予 Amazon ECR 权限。

`cloudwatch` 和 `logs` 操作适用于“\$1”资源。有关更多信息，请参阅 Amazon CloudWatch 用户指南中的[CloudWatch 资源和操作](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/iam-access-control-overview-cw.html#CloudWatch_ARN_Format)。

如果您为处理作业指定一个私有 VPC，请添加以下权限。不要在策略中使用任何条件或资源筛选器。否则，在创建处理作业期间进行的验证检查将失败。

```
{
    "Effect": "Allow",
    "Action": [
        "ec2:CreateNetworkInterface",
        "ec2:CreateNetworkInterfacePermission",
        "ec2:DeleteNetworkInterface",
        "ec2:DeleteNetworkInterfacePermission",
        "ec2:DescribeNetworkInterfaces",
        "ec2:DescribeVpcs",
        "ec2:DescribeDhcpOptions",
        "ec2:DescribeSubnets",
        "ec2:DescribeSecurityGroups"
    ]
}
```

如果您的输入使用服务器端加密和 KMS AWS 托管密钥 (SSE-KMS) 进行加密，请添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
        "kms:Decrypt"
    ]
}
```

如果在处理作业的输出配置中指定一个 KMS 密钥，则添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
    "kms:Encrypt"
    ]
}
```

如果在处理作业的资源配置中指定一个批量 KMS 密钥，则添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
    "kms:CreateGrant"
    ]
}
```

## CreateTrainingJob API：执行角色权限
<a name="sagemaker-roles-createtrainingjob-perms"></a>

对于可在 `CreateTrainingJob` API 请求中传递的执行角色，您可以将以下权限策略附加到该角色：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricData",
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:CreateLogGroup",
                "logs:DescribeLogStreams",
                "s3:GetObject",
                "s3:PutObject",
                "s3:ListBucket",
                "ecr:GetAuthorizationToken",
                "ecr:BatchCheckLayerAvailability",
                "ecr:GetDownloadUrlForLayer",
                "ecr:BatchGetImage"
            ],
            "Resource": "*"
        }
    ]
}
```

------

您无需指定 `"Resource": "*"`，而是可以将这些权限限制为特定的 Amazon S3 和 Amazon ECR 资源：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricData",
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:CreateLogGroup",
                "logs:DescribeLogStreams",
                "ecr:GetAuthorizationToken"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::inputbucket"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": [
                "arn:aws:s3:::inputbucket/object",
                "arn:aws:s3:::outputbucket/path"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "ecr:BatchCheckLayerAvailability",
                "ecr:GetDownloadUrlForLayer",
                "ecr:BatchGetImage"
            ],
            "Resource": "arn:aws:ecr:us-east-1:111122223333:repository/my-repo"
        }
    ]
}
```

------

如果 `CreateTrainingJob.AlgorithSpecifications.TrainingImage` 需要访问其他数据源 (如 DynamoDB 或 Amazon RDS 资源)，则向此策略添加相关权限。

如果您使用`AlgorithmSpecification.AlgorithmArn`参数指定算法资源，则执行角色还必须具有以下权限：

```
{
    "Effect": "Allow",
    "Action": [
        "sagemaker:DescribeAlgorithm"
    ],
    "Resource": "arn:aws:sagemaker:*:*:algorithm/*"
}
```

在上一个策略中，您按如下方式确定策略范围：
+ 仅向您在 `s3:ListBucket` 请求中指定作为 `InputDataConfig.DataSource.S3DataSource.S3Uri` 的特定存储桶授予 `CreateTrainingJob` 权限。
+ 仅向您在 `s3:GetObject ` 请求的输入和输出数据配置中指定的以下对象授予 `s3:PutObject`和 `CreateTrainingJob` 权限：

  `InputDataConfig.DataSource.S3DataSource.S3Uri`

  `OutputDataConfig.S3OutputPath`
+ 仅向您在 `CreateTrainingJob` 请求中指定的注册表路径 (`AlgorithmSpecification.TrainingImage`) 授予 Amazon ECR 权限。

`cloudwatch` 和 `logs` 操作适用于“\$1”资源。有关更多信息，请参阅 Amazon CloudWatch 用户指南中的[CloudWatch 资源和操作](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/iam-access-control-overview-cw.html#CloudWatch_ARN_Format)。

如果您为训练作业指定一个私有 VPC，请添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
      "ec2:CreateNetworkInterface",
      "ec2:CreateNetworkInterfacePermission",
      "ec2:DeleteNetworkInterface",
      "ec2:DeleteNetworkInterfacePermission",
      "ec2:DescribeNetworkInterfaces",
      "ec2:DescribeVpcs",
      "ec2:DescribeDhcpOptions",
      "ec2:DescribeSubnets",
      "ec2:DescribeSecurityGroups"
    ]
}
```

如果您的输入使用服务器端加密和 KMS AWS 托管密钥 (SSE-KMS) 进行加密，请添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
        "kms:Decrypt"
    ]
}
```

如果在训练作业的输出配置中指定一个 KMS 密钥，则添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
    "kms:Encrypt"
    ]
}
```

如果在训练作业的资源配置中指定一个批量 KMS 密钥，则添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
    "kms:CreateGrant"
    ]
}
```

## CreateModel API：执行角色权限
<a name="sagemaker-roles-createmodel-perms"></a>

对于可在 `CreateModel` API 请求中传递的执行角色，您可以将以下权限策略附加到该角色：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricData",
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:CreateLogGroup",
                "logs:DescribeLogStreams",
                "s3:GetObject",
                "s3:ListBucket",
                "ecr:GetAuthorizationToken",
                "ecr:BatchCheckLayerAvailability",
                "ecr:GetDownloadUrlForLayer",
                "ecr:BatchGetImage"
            ],
            "Resource": "*"
        }
    ]
}
```

------

您无需指定 `"Resource": "*"`，而是可以将这些权限限制为特定的 Amazon S3 和 Amazon ECR 资源：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricData",
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:CreateLogGroup",
                "logs:DescribeLogStreams",
                "ecr:GetAuthorizationToken"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::inputbucket/object"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "ecr:BatchCheckLayerAvailability",
                "ecr:GetDownloadUrlForLayer",
                "ecr:BatchGetImage"
            ],
            "Resource": [
                "arn:aws:ecr:us-east-1:111122223333:repository/my-repo",
                "arn:aws:ecr:us-east-1:111122223333:repository/my-repo"
            ]
        }
    ]
}
```

------

如果 `CreateModel.PrimaryContainer.Image` 需要访问其他数据源 (如 Amazon DynamoDB 或 Amazon RDS 资源)，则向此策略添加相关权限。

在上一个策略中，您按如下方式确定策略范围：
+ 仅向您在 `PrimaryContainer.ModelDataUrl` 请求的 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html) 中指定的对象授予 S3 权限。
+ 仅向您在 `CreateModel` 请求中指定作为 `PrimaryContainer.Image` 和 `SecondaryContainer.Image` 的特定注册表路径授予 Amazon ECR 权限。

`cloudwatch` 和 `logs` 操作适用于“\$1”资源。有关更多信息，请参阅 Amazon CloudWatch 用户指南中的[CloudWatch 资源和操作](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/iam-access-control-overview-cw.html#CloudWatch_ARN_Format)。

**注意**  
如果您计划使用 [SageMaker AI 部署护栏功能](https://docs.aws.amazon.com/sagemaker/latest/dg/deployment-guardrails.html)在生产环境中部署模型，请确保您的执行角色有权对自动回滚警`cloudwatch:DescribeAlarms`报执行操作。

如果您为模型指定一个私有 VPC，请添加以下权限：

```
{
    "Effect": "Allow",
    "Action": [
        "ec2:CreateNetworkInterface",
        "ec2:CreateNetworkInterfacePermission",
        "ec2:DeleteNetworkInterface",
        "ec2:DeleteNetworkInterfacePermission",
        "ec2:DescribeNetworkInterfaces",
        "ec2:DescribeVpcs",
        "ec2:DescribeDhcpOptions",
        "ec2:DescribeSubnets",
        "ec2:DescribeSecurityGroups"
    ]
}
```

# SageMaker 地理空间功能角色
<a name="sagemaker-geospatial-roles"></a>

作为一项托管服务，Amazon SageMaker 地理空间功能代表您在 SageMaker AI 管理的 AWS 硬件上执行操作。用于 AWS Identity and Access Management 向用户、群组和角色授予对 SageMaker 地理空间的访问权限。

IAM 管理员可以使用、或其中之一向用户、群组或角色授予这些权限 AWS SDKs。 AWS 管理控制台 AWS CLI

**要使用 SageMaker 地理空间，您需要以下 IAM 权限。**

1. **A SageMaker I 执行角色。**

   要使用特定于 SageMaker 地理空间的 API 操作，您的 SageMaker AI 执行角色必须在执行角色的信任策略`sagemaker-geospatial.amazonaws.com`中包含 SageMaker 地理空间服务主体。这允许 SageMaker AI 执行角色 AWS 账户 代表您执行操作。

1. **有权访问 Amazon SageMaker Studio Classic 和 SageMaker 地理空间的用户、群组或角色**

   要开始使用 SageMaker 地理空间，您可以使用 AWS 托管策略:`AmazonSageMakerGeospatialFullAccess`. 此授权将授予用户、群组或角色对 SageMaker 地理空间的完全访问权限。要查看该策略并详细了解哪些操作、资源和条件可用，请参阅 [AWS 托管策略： AmazonSageMakerFullAccess](security-iam-awsmanpol.md#security-iam-awsmanpol-AmazonSageMakerFullAccess)。

   要开始使用 Studio Classic 并创建亚马逊 SageMaker AI 域名，请参阅[亚马逊 SageMaker AI 域名概述](gs-studio-onboard.md)。

使用以下主题创建新的 SageMaker AI 执行角色，更新现有的 SageMaker AI 执行角色，并学习如何使用特定于 SageMaker 地理空间的 IAM 操作、资源和条件来管理权限。

**Topics**
+ [创建新的 SageMaker AI 执行角色](sagemaker-geospatial-roles-create-execution-role.md)
+ [将 SageMaker 地理空间服务主体添加到现有 SageMaker AI 执行角色中](sagemaker-geospatial-roles-pass-role.md)
+ [`StartEarthObservationJob` API：执行角色权限](sagemaker-roles-start-eoj-perms.md)
+ [`StartVectorEnrichmentJob` API：执行角色权限](sagemaker-roles-start-vej-perms.md)
+ [`ExportEarthObservationJob` API：执行角色权限](sagemaker-roles-export-eoj-perms.md)
+ [`ExportVectorEnrichmentJob` API：执行角色权限](sagemaker-roles-export-vej-perms.md)

# 创建新的 SageMaker AI 执行角色
<a name="sagemaker-geospatial-roles-create-execution-role"></a>

要使用 SageMaker 地理空间功能，必须设置用户、群组或角色以及执行角色。用户角色是一种具有权限策略的 AWS 身份，该策略决定了用户在其中可以做什么和不能做什么 AWS。执行角色是一个 IAM 角色，用于授予访问 AWS 资源的服务权限。执行角色由权限和信任策略组成。信任策略指定哪些主体有权代入该角色。

SageMaker 地理空间还需要不同的服务主体，`sagemaker-geospatial.amazonaws.com`。如果您是现有的 SageMaker AI 客户，则必须将此额外服务委托人添加到您的信任策略中。

使用以下过程创建一个新的执行角色，并附加 IAM 托管策略 `AmazonSageMakerGeospatialFullAccess`。如果您的使用案例需要更精细的权限，请使用本指南的其他部分来创建满足业务需求的执行角色。

**重要**  
以下过程中使用的 IAM 管理策略 `AmazonSageMakerGeospatialFullAccess` 只授予执行角色对名称中包含 `SageMaker`、`Sagemaker`、`sagemaker` 或 `aws-glue` 的存储桶或对象执行特定 Amazon S3 操作的权限。要了解如何更新执行角色的策略以授予其访问其他 Amazon S3 存储桶和对象的权限，请参阅[向 A SageMaker I 执行角色添加其他 Amazon S3 权限](sagemaker-roles.md#sagemaker-roles-get-execution-role-s3)。

**创建新角色**

1. 使用 [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/) 打开 IAM 控制台。

1. 选择**角色**，然后选择**创建角色**。

1. 选择 **SageMaker**。

1. 选择**下一步：权限**。

1. IAM 托管策略 `AmazonSageMakerGeospatialFullAccess` 会自动附加到此角色。要查看此策略中包含的权限，请选择策略名称旁边的横向箭头。选择**下一步：标签**。

1. （可选）添加标签并选择**下一步：查看**。

1. 在**角色名称**下的文本字段中为角色命名，然后选择**创建角色**。

1. 在 IAM 控制台的**角色**部分中，选择刚刚在步骤 7 中创建的角色。如果需要，请通过文本框使用您在步骤 7 中输入的角色名称搜索角色。

1. 在角色摘要页面上，记下 ARN。

# 将 SageMaker 地理空间服务主体添加到现有 SageMaker AI 执行角色中
<a name="sagemaker-geospatial-roles-pass-role"></a>

要使用特定于 SageMaker 地理空间的 API 操作，您的 SageMaker AI 执行角色必须在执行角色的信任策略`sagemaker-geospatial.amazonaws.com`中包含 SageMaker 地理空间服务主体。这允许 SageMaker AI 执行角色 AWS 账户 代表您执行操作。

诸如在服务之间传递角色之类的操作在 SageMaker AI 中很常见。有关更多详细信息，

要将 SageMaker 地理空间服务主体添加到现有 SageMaker AI 执行角色中，请更新现有策略以包含 SageMaker 地理空间服务主体，如以下信任策略所示。通过将服务主体附加到信任策略，A SageMaker I 执行角色现在可以代表您运行特定 APIs 于 SageMaker 地理空间的权限。

要详细了解特定于 SageMaker 地理空间的 IAM 操作、资源和条件，请参阅 IA *M 用户指南*中的 A [ SageMaker I 操作、资源和条件密钥](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonsagemaker.html#amazonsagemaker-actions-as-permissions)。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": [
                    "sagemaker-geospatial.amazonaws.com",
                    "sagemaker.amazonaws.com"
                ]
            },
            "Action": "sts:AssumeRole"
        }
    ]
}
```

------

# `StartEarthObservationJob` API：执行角色权限
<a name="sagemaker-roles-start-eoj-perms"></a>

对于可在 `StartEarthObservationJob` API 请求中传递的执行角色，您可以将以下最低权限策略附加到该角色：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:AbortMultipartUpload",
                "s3:PutObject",
                "s3:GetObject",
                "s3:ListBucketMultipartUploads"
            ],
            "Resource": [
                "arn:aws:s3:::*SageMaker*",
                "arn:aws:s3:::*Sagemaker*",
                "arn:aws:s3:::*sagemaker*"
            ]
        },
        {
        "Effect": "Allow",
        "Action": "sagemaker-geospatial:GetEarthObservationJob",
        "Resource":  "arn:aws:sagemaker-geospatial:*:*:earth-observation-job/*"
        },
        {
        "Effect": "Allow",
        "Action": "sagemaker-geospatial:GetRasterDataCollection",
        "Resource": "arn:aws:sagemaker-geospatial:*:*:raster-data-collection/*"
        }
    ]
    }
```

------

如果您输入的 Amazon S3 存储桶使用服务器端加密和 AWS KMS 托管密钥 (SSE-KMS) 进行加密，请参阅使用 [Amazon S3 存储桶密钥](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-key.html)了解更多信息。

# `StartVectorEnrichmentJob` API：执行角色权限
<a name="sagemaker-roles-start-vej-perms"></a>

对于可在 `StartVectorEnrichmentJob` API 请求中传递的执行角色，您可以将以下最低权限策略附加到该角色：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:AbortMultipartUpload",
                "s3:PutObject",
                "s3:GetObject",
                "s3:ListBucketMultipartUploads"
            ],
            "Resource": [
                "arn:aws:s3:::*SageMaker*",
                "arn:aws:s3:::*Sagemaker*",
                "arn:aws:s3:::*sagemaker*"
            ]
        },
        {
        "Effect": "Allow",
        "Action": "sagemaker-geospatial:GetVectorEnrichmentJob",
        "Resource":  "arn:aws:sagemaker-geospatial:*:*:vector-enrichment-job/*"
        }
    ]
    }
```

------

如果您输入的 Amazon S3 存储桶使用服务器端加密和 AWS KMS 托管密钥 (SSE-KMS) 进行加密，请参阅使用 [Amazon S3 存储桶密钥](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-key.html)了解更多信息。

# `ExportEarthObservationJob` API：执行角色权限
<a name="sagemaker-roles-export-eoj-perms"></a>

对于可在 `ExportEarthObservationJob` API 请求中传递的执行角色，您可以将以下最低权限策略附加到该角色：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:AbortMultipartUpload",
                "s3:PutObject",
                "s3:GetObject",
                "s3:ListBucketMultipartUploads"
            ],
            "Resource": [
                "arn:aws:s3:::*SageMaker*",
                "arn:aws:s3:::*Sagemaker*",
                "arn:aws:s3:::*sagemaker*"
            ]
        },
        {
        "Effect": "Allow",
        "Action": "sagemaker-geospatial:GetEarthObservationJob",
        "Resource":  "arn:aws:sagemaker-geospatial:*:*:earth-observation-job/*"
        }
    ]
    }
```

------

如果您输入的 Amazon S3 存储桶使用服务器端加密和 AWS KMS 托管密钥 (SSE-KMS) 进行加密，请参阅使用 [Amazon S3 存储桶密钥](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-key.html)了解更多信息。

# `ExportVectorEnrichmentJob` API：执行角色权限
<a name="sagemaker-roles-export-vej-perms"></a>

对于可在 `ExportVectorEnrichmentJob` API 请求中传递的执行角色，您可以将以下最低权限策略附加到该角色：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:AbortMultipartUpload",
                "s3:PutObject",
                "s3:GetObject",
                "s3:ListBucketMultipartUploads"
            ],
            "Resource": [
                "arn:aws:s3:::*SageMaker*",
                "arn:aws:s3:::*Sagemaker*",
                "arn:aws:s3:::*sagemaker*"
            ]
        },
        {
        "Effect": "Allow",
        "Action": "sagemaker-geospatial:GetVectorEnrichmentJob",
        "Resource":  "arn:aws:sagemaker-geospatial:*:*:vector-enrichment-job/*"
        }
    ]
    }
```

------

如果您输入的 Amazon S3 存储桶使用服务器端加密和 AWS KMS 托管密钥 (SSE-KMS) 进行加密，请参阅使用 [Amazon S3 存储桶](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-key.html)密钥。

# Amazon SageMaker 角色管理器
<a name="role-manager"></a>

争取使用 Amazon A SageMaker I 获得最低权限的机器学习 (ML) 管理员必须考虑各种行业视角，包括数据科学家、机器学习运营 (MLOps) 工程师等角色所需的独特最低权限访问需求。使用 Amazon SageMaker Role Manager 直接通过 Amazon A SageMaker I 控制台构建和管理基于角色的 IAM 角色，以满足常见的机器学习需求。

Amazon SageMaker Role Manager 为常见的机器学习活动提供 3 个预配置的角色角色和预定义的权限。浏览所提供的角色及其建议的策略，或者为您的业务需求所特有的角色创建和维护角色。如果您需要其他自定义，请在亚马逊 SageMaker 角色管理器中[步骤 1：输入角色信息](role-manager-tutorial.md#role-manager-tutorial-enter-role-information)为[亚马逊 Virtual Private Cloud](https://aws.amazon.com/vpc/) 资源和[AWS Key Management Service](https://aws.amazon.com/kms/)加密密钥指定联网和加密权限。

**Topics**
+ [使用角色管理器（控制台）](role-manager-tutorial.md)
+ [使用角色管理器 (AWS CDK)](role-manager-tutorial-cdk.md)
+ [角色参考](role-manager-personas.md)
+ [机器学习活动参考](role-manager-ml-activities.md)
+ [启动 Studio Classic](role-manager-launch-notebook.md)
+ [角色管理器 FAQs](role-manager-faqs.md)

# 使用角色管理器（控制台）
<a name="role-manager-tutorial"></a>

您可以从 Amazon A SageMaker I 控制台左侧导航栏的以下位置使用亚马逊 SageMaker 角色管理器：
+ **入门** - 快速为您的用户添加权限策略。
+ **域** — 为 Amazon A SageMaker I 域中的用户添加权限策略。
+ **笔记本** - 为创建和运行笔记本的用户添加最低权限。
+ **训练** - 为创建和管理训练作业的用户添加最低权限。
+ **推理** - 为部署和管理推理模型的用户添加最低权限。

您可以使用以下步骤从 SageMaker AI 控制台中的不同位置开始创建角色的过程。

## 开始使用
<a name="role-manager-tutorial-getting-started"></a>

如果您是第一次使用 SageMaker AI，我们建议您从 “**入门**” 部分创建角色。

要使用 Amazon 角色管理器创建 SageMaker 角色，请执行以下操作。

1. 打开亚马逊 A SageMaker I 控制台。

1. 在左侧导航窗格中，选择**管理员配置**。

1. 在**管理员配置**下，选择**角色管理器**。

1. 选择**创建角色**。

## 域
<a name="role-manager-tutorial-domain"></a>

在开始创建 Amazon A SageMaker I 域名时，您可以使用亚马逊 SageMaker 角色管理器创建角色。

要使用 Amazon 角色管理器创建 SageMaker 角色，请执行以下操作。

1. 打开亚马逊 A SageMaker I 控制台。

1. 在左侧导航窗格中，选择**管理员配置**。

1. 在**管理员配置**下，选择**域**。

1. 选择**创建域**。

1. 选择**使用角色创建向导创建角色**。

## 笔记本
<a name="role-manager-tutorial-notebook"></a>

在开始创建笔记本的过程时，您可以使用 Amazon SageMaker 角色管理器创建角色。

要使用 Amazon 角色管理器创建 SageMaker 角色，请执行以下操作。

1. 打开亚马逊 A SageMaker I 控制台。

1. 在左侧导航栏中，选择**笔记本**。

1. 选择**笔记本实例**。

1. 选择**创建笔记本实例**。

1. 选择**使用角色创建向导创建角色**。

## 训练
<a name="role-manager-tutorial-training"></a>

在开始创建训练作业的过程时，您可以使用 Amazon Role Manager 创建 SageMaker 角色。

要使用 Amazon 角色管理器创建 SageMaker 角色，请执行以下操作。

1. 打开亚马逊 A SageMaker I 控制台。

1. 在左侧导航栏中，选择**训练**。

1. 选择**训练作业**。

1. 选择 **Create training job (创建训练作业)**。

1. 选择**使用角色创建向导创建角色**。

## 推理
<a name="role-manager-tutorial-inference"></a>

在开始部署用于推理的模型时，您可以使用 Amazon Role Manager 创建 SageMaker 角色。

要使用 Amazon 角色管理器创建 SageMaker 角色，请执行以下操作。

1. 打开亚马逊 A SageMaker I 控制台。

1. 在左侧导航栏中，选择**推理**。

1. 选择**模型**。

1. 选择**创建模型**。

1. 选择**使用角色创建向导创建角色**。

完成上述过程之一后，使用以下部分中的信息来帮助创建角色。

## 先决条件
<a name="role-manager-tutorial-prerequisites"></a>

要使用 Amazon SageMaker 角色管理器，您必须拥有创建 IAM 角色的权限。该权限通常提供给机器学习管理员和拥有机器学习从业者最低权限的角色。

您可以 AWS 管理控制台 通过[切换角色在中临时担任 IAM 角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-console.html)。有关使用角色的方法的更多信息，请参阅《IAM 用户指南》中的[使用 IAM 角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)**。

## 步骤 1：输入角色信息
<a name="role-manager-tutorial-enter-role-information"></a>

提供一个名称以用作新 SageMaker AI 角色的唯一后缀。默认情况下，每个角色名称都会添加前缀 `"sagemaker-"`，以便于在 IAM 控制台中搜索。例如，如果您在创建角色时将角色命名为 `test-123`，则您的角色将在 IAM 控制台中显示为 `sagemaker-test-123`。您也可以添加对角色的描述，以提供更多详细信息。

然后，从一个可用角色中进行选择，以获取数据科学家、数据工程师或机器学习运营 (MLOps) 工程师等角色的建议权限。有关可用角色及其建议权限的信息，请参阅[角色参考](role-manager-personas.md)。要在没有任何建议权限的情况下创建角色，请选择**自定义角色设置**。

**注意**  
我们建议您首先使用角色管理器创建 A SageMaker I 计算角色，以便 SageMaker AI 计算资源能够执行训练和推理等任务。使用 SageMaker AI Compute 角色角色与角色经理一起创建此角色。创建 A SageMaker I 计算角色后，记下其 ARN 以备将来使用。

### 网络和加密条件
<a name="role-manager-tutorial-enter-role-information-network-and-encryption"></a>

我们建议您激活 VPC 自定义以使用 VPC 配置、子网和安全组，以及与您的新角色关联的 IAM 策略。激活 VPC 自定义后，与 VPC 资源交互的机器学习活动的 IAM 策略的范围将缩小为最低权限访问权限。默认情况下不激活 VPC 自定义。有关推荐的网络架构的更多详细信息，请参阅《AWS 技术指南》**中的[网络架构](https://docs.aws.amazon.com/whitepapers/latest/build-secure-enterprise-ml-platform/networking-architecture.html)。

对于包含高度敏感数据的受监管工作负载，您还可以使用 KMS 密钥对数据进行加密、解密和重新加密。激活 AWS KMS 自定义后，支持自定义加密密钥的机器学习活动的 IAM 策略的范围将缩小为最低权限访问权限。有关更多信息，请参阅《AWS 技术指南》**中的[使用 AWS KMS进行加密](https://docs.aws.amazon.com/whitepapers/latest/build-secure-enterprise-ml-platform/encryption-with-kms.html)。

## 步骤 2：配置机器学习活动
<a name="role-manager-tutorial-configure-ml-activities"></a>

每个 Amazon SageMaker Role Manager 机器学习活动都包含建议的 IAM 权限，用于提供对相关 AWS 资源的访问权限。某些 ML 活动需要您添加服务角色 ARNs 才能完成设置。有关预定义的机器学习活动及其权限的信息，请参阅 [机器学习活动参考](role-manager-ml-activities.md)。有关添加服务角色的信息，请参阅[服务角色](#role-manager-tutorial-configure-ml-activities-service-roles)。

根据所选角色，已经选择了某些机器学习活动。您可以取消选择任何建议的机器学习活动，也可以选择其他活动来创建自己的角色。如果您选择了“自定义角色设置”角色，则在此步骤中不会预先选择任何机器学习活动。

您可以在中的角色中添加任何其他 AWS 或由客户管理的 IAM 策略。[步骤 3：添加其他策略和标签](#role-manager-tutorial-add-policies-and-tags)

### 服务角色
<a name="role-manager-tutorial-configure-ml-activities-service-roles"></a>

某些 AWS 服务需要服务角色才能代表您执行操作。如果所选的机器学习活动要求您传递服务角色，则必须提供该服务角色的 ARN。

您可以创建新的服务角色或使用现有的服务角色，例如使用 SageMaker AI Compute Role 角色角色创建的服务角色。您可以通过在 [IAM 控制台](https://console.aws.amazon.com/iamv2/)的“角色”部分选择角色名称来找到现有角色的 ARN。要了解有关服务角色的更多信息，请参阅[为 AWS 服务创建角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html)。

## 步骤 3：添加其他策略和标签
<a name="role-manager-tutorial-add-policies-and-tags"></a>

您可以将任何现有 AWS 或客户托管的 IAM 策略添加到您的新角色中。有关现有 SageMaker AI 策略的信息，请参阅适用于 A [mazon A SageMaker I 的AWS 托管策略](https://docs.aws.amazon.com/sagemaker/latest/dg/security-iam-awsmanpol.html)。您也可以在 [IAM 控制台](https://console.aws.amazon.com/iamv2/)的**角色**部分查看现有策略。

或者，使用基于标签的策略条件来分配元数据信息，以便对资源进行分类和管理 AWS 。每个标签都由一个键值对表示。有关更多信息，请参阅[使用标签控制对 AWS 资源的访问](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html)。

## 审核角色
<a name="role-manager-tutorial-review-role"></a>

花点时间查看与您的新角色相关的所有信息。选择**上一步**可返回并编辑任何信息。当您准备好创建角色时，选择**创建角色**。这将生成一个角色，该角色具有您选择的机器学习活动的权限。您可以在 [IAM 控制台](https://console.aws.amazon.com/iamv2/)的**角色**部分查看新角色。

# 使用角色管理器 (AWS CDK)
<a name="role-manager-tutorial-cdk"></a>

使用 wit AWS Cloud Development Kit (AWS CDK) h Amazon SageMaker 角色管理器以编程方式创建角色和设置权限。您可以使用 AWS CDK 来完成使用可以执行的任何任务 AWS 管理控制台。通过 CDK 的编程访问权限，可以更轻松地为用户提供访问特定资源的权限。有关的更多信息 AWS CDK，请参阅[什么是 AWS CDK？](https://docs.aws.amazon.com/cdk/v2/guide/home.html)

**重要**  
必须使用 SageMaker AI 计算角色角色来创建 A SageMaker I 计算角色。有关计算角色的更多信息，请参阅 [SageMaker AI 计算角色](role-manager-personas.md#role-manager-personas-compute)。有关可用于在中创建计算角色的代码 AWS CDK，请参阅[向计算角色授予权限](#role-manager-cdk-compute-persona)。

以下是可在 AWS CDK中执行的任务示例：
+ 为机器学习 (ML) 角色（例如数据科学家和 MLOps 工程师）创建具有精细权限的 IAM 角色。
+ 为来自机器学习角色或机器学习活动的 CDK 构造授予权限。
+ 设置机器学习活动条件参数。
+ 启用全球 Amazon VPC 和 AWS Key Management Service 条件并为其设置值。
+ 为用户提供各种版本的机器学习活动供选择，而不会导致他们的访问中断。

有一些与使用 A SageMaker I 的机器学习 (ML) 相关的常见 AWS 任务需要特定的 IAM 权限。在 Amazon SageMaker 角色管理器中，执行任务的权限定义为机器学习活动。机器学习活动指定了一组与 IAM 角色关联的权限。例如，Amazon SageMaker Studio Classic 的机器学习活动拥有用户访问 Studio Classic 所需的所有权限。有关机器学习活动的更多信息，请参阅 [机器学习活动参考](role-manager-ml-activities.md)。

创建角色时，首先要定义机器学习角色或机器学习活动的构造。构造是 AWS CDK 堆栈中的资源。例如，构造可以是 Amazon S3 存储桶、Amazon VPC 子网或 IAM 角色。

创建角色或活动时，您可以将与该角色或活动关联的权限限制为特定资源。例如，您可以将活动自定义为仅提供对 Amazon VPC 内特定子网的权限。

定义权限后，您可以创建角色，然后将这些角色传递给其他资源，例如 SageMaker 笔记本实例。



以下是 TypeScript 中可以使用 CDK 完成的任务的代码示例。创建活动时，需要为活动的构造指定 ID 和选项。这些选项是指定活动所需参数（如 Amazon S3）的字典。您可以为没有必需参数的活动传递一个空字典。

## 向计算角色授予权限
<a name="role-manager-cdk-compute-persona"></a>

以下代码创建了一个数据科学家机器学习角色，其中包含一组特定于该角色的机器学习活动。来自机器学习活动的权限仅适用于 Amazon VPC 和角色结构中指定的 AWS KMS 配置。以下代码为数据科学家角色创建了一个类。活动列表中定义了机器学习活动。VPC 权限和 KMS 权限定义为活动列表之外的可选参数。

定义类后，可以在 AWS CDK 堆栈中创建角色作为构造。您也可以创建笔记本实例。使用您在以下代码中创建的 IAM 角色的用户可以在登录自己的 AWS 账户时访问笔记本实例。

```
export class myCDKStack extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const persona = new Persona(this, 'example-persona-id', {
        activities: [
            Activity.accessAwsServices(this, 'example-id1', {})
        ]
    });

    const role = persona.createRole(this, 'example-IAM-role-id', 'example-IAM-role-name');
    
    }
}
```

## 向数据科学家角色授予权限
<a name="role-manager-cdk-data-scientist"></a>

以下代码创建了一个数据科学家机器学习角色，其中包含一组特定于该角色的机器学习活动。机器学习活动的权限仅适用于角色构造中指定的 VPC 和 KMS 配置。以下代码为数据科学家角色创建了一个类。活动列表中定义了机器学习活动。Amazon VPC AWS KMS 权限和权限定义为活动列表之外的可选参数。

定义类后，可以在 AWS CDK 堆栈中创建角色作为构造。您也可以创建笔记本实例。使用您在以下代码中创建的 IAM 角色的用户可以在登录自己的 AWS 账户时访问笔记本实例。

```
export class myCDKStack extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const persona = new Persona(this, 'example-persona-id', {
        activities: [
            Activity.runStudioAppsV2(this, 'example-id1', {}),
            Activity.manageJobs(this, 'example-id2', {rolesToPass: [iam.Role.fromRoleName('example-IAM-role-name')]}),
            Activity.manageModels(this, 'example-id3', {rolesToPass: [iam.Role.fromRoleName('example-IAM-role-name')]}),
            Activity.manageExperiments(this, 'example-id4', {}),
            Activity.visualizeExperiments(this, 'example-id5', {}),
            Activity.accessS3Buckets(this, 'example-id6', {s3buckets: [s3.S3Bucket.fromBucketName('amzn-s3-demo-bucket')]})
        ],
        // optional: to configure VPC permissions
        subnets: [ec2.Subnet.fromSubnetId('example-VPC-subnet-id')],
        securityGroups: [ec2.SecurityGroup.fromSecurityGroupId('example-VPC-security-group-id')],
        // optional: to configure KMS permissions
        dataKeys: [kms.Key.fromKeyArn('example-KMS-key-ARN')],
        volumeKeys: [kms.Key.fromKeyArn('example-KMS-key-ARN')],
    });

    const role = persona.createRole(this, 'example-IAM-role-id', 'example-IAM-role-name');
    
    const notebookInstance = new CfnNotebookInstance(this, 'example-notebook-instance-name', { RoleArn: role.RoleArn, ...});
    }
}
```

## 向机器学习 Ops 角色授予权限
<a name="role-manager-cdk-ml-ops-persona"></a>

以下代码创建了一个机器学习 Ops 角色，其中包含一组特定于该角色的机器学习活动。来自机器学习活动的权限仅适用于 Amazon VPC 和角色结构中指定的 AWS KMS 配置。以下代码为机器学习 Ops 角色创建了一个类。活动列表中定义了机器学习活动。VPC 权限和 KMS 权限定义为活动列表之外的可选参数。

定义类后，可以在 AWS CDK 堆栈中创建角色作为构造。您也可以创建 Amazon SageMaker Studio 经典版用户个人资料。使用您在以下代码中创建的 IAM 角色的用户可以在登录自己的 AWS 账户时打开 SageMaker Studio Classic。

```
export class myCDKStack extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const persona = new Persona(this, 'example-persona-id', {
        activities: [
            Activity.runStudioAppsV2(this, 'example-id1', {}),
            Activity.manageModels(this, 'example-id2', {rolesToPass: [iam.Role.fromRoleName('example-IAM-role-name')]}),
            Activity.manageEndpoints(this, 'example-id3',{rolesToPass: [iam.Role.fromRoleName('example-IAM-role-name')]}),
            Activity.managePipelines(this, 'example-id4', {rolesToPass: [iam.Role.fromRoleName('example-IAM-role-name')]}),
            Activity.visualizeExperiments(this, 'example-id5', {})
        ],
        subnets: [ec2.Subnet.fromSubnetId('example-VPC-subnet-id')],
        securityGroups: [ec2.SecurityGroup.fromSecurityGroupId('example-VPC-security-group-id')],
        dataKeys: [kms.Key.fromKeyArn('example-KMS-key-ARN')],
        volumeKeys: [kms.Key.fromKeyArn('example-KMS-key-ARN')],
    });

    const role = persona.createRole(this, 'example-IAM-role-id', 'example-IAM-role-name');
    
    let userProfile = new CfnNUserProfile(this, 'example-Studio Classic-profile-name', { RoleName: role.RoleName, ... });  
    }
}
```

## 向构造授予权限
<a name="role-manager-cdk-ml-ops"></a>

以下代码创建了一个机器学习 Ops 角色，其中包含一组特定于该角色的机器学习活动。以下代码为机器学习 Ops 角色创建了一个类。活动列表中定义了机器学习活动。

定义类后，可以在 AWS CDK 堆栈中创建角色作为构造。您也可以创建笔记本实例。该代码向 Lambda 函数的 IAM 角色授予机器学习活动的权限。

```
export class myCDKStack extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const persona = new Persona(this, 'example-persona-id', {
        activities: [
            Activity.runStudioAppsV2(this, 'example-id1', {}),
            Activity.manageModels(this, 'example-id2', {rolesToPass: [iam.Role.fromRoleName('example-IAM-role-name')]}),
            Activity.manageEndpoints(this, 'example-id3',{rolesToPass: [iam.Role.fromRoleName('example-IAM-role-name')]}),
            Activity.managePipelines(this, 'example-id4', {rolesToPass: [iam.Role.fromRoleName('example-IAM-role-name')]}),
            Activity.visualizeExperiments(this, 'example-id5', {})
        ],
    });

    const lambdaFn = lambda.Function.fromFunctionName('example-lambda-function-name');
    persona.grantPermissionsTo(lambdaFn);
    }
}
```

## 为单个机器学习活动授予权限
<a name="role-manager-cdk-single-ml-activity"></a>

以下代码创建了一个机器学习活动，并从该活动中创建了一个角色。该活动的权限仅适用于您为用户指定的 VPC 和 KMS 配置。

```
export class myCDKStack extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const activity = Activity.manageJobs(this, 'example-activity-id', {
        rolesToPass: [iam.Role.fromRoleName('example-IAM-role-name')],
        subnets: [ec2.Subnet.fromSubnetId('example-VPC-subnet-id')],
        securityGroups: [ec2.SecurityGroup.fromSecurityGroupId('example-VPC-security-group-id')],
        dataKeys: [kms.Key.fromKeyArn('example-KMS-key-ARN')],
        volumeKeys: [kms.Key.fromKeyArn('example-KMS-key-ARN')],
    });

    const role = activity.createRole(this, 'example-IAM-role-id', 'example-IAM-role-name');
    }
}
```

## 创建角色并为其授予单个活动的权限
<a name="role-manager-cdk-permissions"></a>

以下代码为单个机器学习活动创建了 IAM 角色。

```
export class myCDKStack extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const activity = Activity.manageJobs(this, 'example-activity-id', {
        rolesToPass: [iam.Role.fromRoleName('example-IAM-role-name')],
    });
        

    activity.create_role(this, 'example-IAM-role-id', 'example-IAM-role-name') 
    }
}
```

# 角色参考
<a name="role-manager-personas"></a>

Amazon SageMaker Role Manager 为许多机器学习角色提供了建议的权限。其中包括用于常见机器学习从业人员职责的用户执行角色，以及与 SageMaker 人工智能合作所需的常见 AWS 服务交互的服务执行角色。

每个角色都有以选定机器学习活动为形式的建议权限。有关预定义的机器学习活动及其权限的信息，请参阅 [机器学习活动参考](role-manager-ml-activities.md)。

## 数据科学家角色
<a name="role-manager-personas-data-scientist"></a>

使用此角色配置权限，以便在 SageMaker AI 环境中执行一般的机器学习开发和实验。此角色包括以下预先选择的机器学习活动：
+ 运行 Studio Classic 应用程序
+ 管理机器学习作业
+ 管理模型
+ 管理 AWS Glue 表格
+ Canvas AI Services
+ 帆布 MLOps
+ Canvas Kendra Access
+ 使用 MLflow
+ 需要访问 AWS 以下服务 MLflow
+ 运行 Studio EMR Serverless 应用程序

## MLOps 角色
<a name="role-manager-personas-mlops"></a>

选择此角色来配置运营活动的权限。此角色包括以下预先选择的机器学习活动：
+ 运行 Studio Classic 应用程序
+ 管理模型
+ 管理管道
+ 搜索和可视化实验
+ Amazon S3 Full Access

## SageMaker AI 计算角色
<a name="role-manager-personas-compute"></a>

**注意**  
我们建议您首先使用角色管理器创建 A SageMaker I 计算角色，以便 SageMaker AI 计算资源可以执行训练和推理等任务。使用 SageMaker AI Compute 角色角色与角色经理一起创建此角色。创建 A SageMaker I 计算角色后，记下其 ARN 以备将来使用。

此角色包括以下预先选择的机器学习活动：
+ 访问必需的 AWS 服务

# 机器学习活动参考
<a name="role-manager-ml-activities"></a>

机器学习活动是与使用 SageMaker AI 进行机器学习相关的常见 AWS 任务，需要特定的 IAM 权限。使用 [Amazon SageMaker 角色](https://docs.aws.amazon.com/sagemaker/latest/dg/role-manager-personas.html)管理器创建角色时，每个角色都会建议相关的机器学习活动。您可以选择任何其他机器学习活动或取消选择任何建议的机器学习活动，以创建满足您独特业务需求的角色。

Amazon SageMaker 角色管理器为以下机器学习活动提供预定义权限：


****  

| **机器学习活动** | **描述** | 
| --- | --- | 
| 访问必需的 AWS 服务 | 访问亚马逊 S3、亚马逊 ECR、亚马逊和亚马逊 CloudWatch EC2 的权限。作业和端点的执行角色需要这些权限。 | 
| 运行 Studio Classic 应用程序 | 在 Studio Classic 环境中运行的权限。域和用户配置文件执行角色需要这些权限。 | 
| 管理机器学习作业 | 审计、查询世系和可视化实验的权限。 | 
| 管理模型 | 在整个生命周期中管理 SageMaker AI 作业的权限。 | 
| 管理管道 | 管理 SageMaker 管道和管道执行的权限。 | 
| 搜索和可视化实验 | 审计、查询血统和可视化 SageMaker AI 实验的权限。 | 
| 管理模型监控 | 管理 A SageMaker I 模型监控器监控计划的权限。 | 
| Amazon S3 Full Access | 执行所有 Amazon S3 操作的权限。 | 
| Amazon S3 存储桶访问 | 在指定的 Amazon S3 存储桶上执行操作的权限。 | 
| 查询 Athena 工作组 | 运行和管理 Amazon Athena 查询的权限。 | 
| 管理 AWS Glue 表格 | 为 SageMaker AI Feature Store 和 Data Wrangler 创建和管理 AWS Glue 表的权限。 | 
| SageMaker 画布核心访问权限 | 在 SageMaker Canvas 中执行实验的权限（即基本数据准备、模型构建、验证）。 | 
| SageMaker Canvas 数据准备（由 Data Wrangler 提供支持） | 在 SageMaker Canvas 中执行 end-to-end数据准备的权限（即聚合、转换和分析数据，在大型数据集上创建和安排数据准备作业）。 | 
| SageMaker 画布人工智能服务 | 访问来自亚马逊 Bedrock、Amazon Textract、Amazon Rekognition 和亚马逊 Comprehend 的 ready-to-use模特的权限。此外，用户可以微调 Amazon Bedrock 和 Amazon 的基础模型。 SageMaker JumpStart | 
| SageMaker 画布 MLOps | 允许 C SageMaker anvas 用户将模型直接部署到端点。 | 
| SageMaker Canvas Kendra 访问权限 | 允许 SageMaker Canvas 访问亚马逊 Kendra 进行企业文档搜索。该权限仅授予您在 Amazon Kendra 中选择的索引名称。 | 
| 使用 MLflow | 在中管理实验、运行和模型的权限 MLflow。 | 
| 管理 MLflow 追踪服务器 | 管理、启动和停止 MLflow 跟踪服务器的权限。 | 
| 需要访问 AWS 以下服务 MLflow |  MLflow 跟踪服务器访问 S3、Secrets Manager 和模型注册表的权限。 | 
| 运行 Studio EMR Serverless 应用程序 | 在 Amazon Studio 上创建和管理 EMR 无服务器应用程序的权限。 SageMaker  | 

# 启动 Studio Classic
<a name="role-manager-launch-notebook"></a>

使用以角色为中心的角色来启动 Studio Classic。如果您是管理员，则可以授予用户访问 Studio Classic 的权限，并让他们直接通过 AWS 管理控制台 或通过扮演角色角色。 AWS IAM Identity Center

## 使用 Studio 经典版启动 AWS 管理控制台
<a name="role-manager-launch-notebook-console"></a>

数据科学家或其他用户要通过 AWS 管理控制台假设自己的角色，需要一个管理控制台角色才能进入 Studio Classic 环境。

您不能使用 Amazon SageMaker 角色管理器创建向授予权限的角色 AWS 管理控制台。但是，在角色管理器中创建服务角色后，您可以前往 IAM 控制台编辑该角色并添加用户访问角色。以下是向 AWS 管理控制台提供用户访问权限的角色示例：

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "DescribeCurrentDomain",
            "Effect": "Allow",
            "Action": "sagemaker:DescribeDomain",
            "Resource": "arn:aws:sagemaker:us-east-1:111122223333:domain/<STUDIO-DOMAIN-ID>"
        },
        {
            "Sid": "RemoveErrorMessagesFromConsole",
            "Effect": "Allow",
            "Action": [
                "servicecatalog:ListAcceptedPortfolioShares",
                "sagemaker:GetSagemakerServicecatalogPortfolioStatus",
                "sagemaker:ListModels",
                "sagemaker:ListTrainingJobs",
                "servicecatalog:ListPrincipalsForPortfolio",
                "sagemaker:ListNotebookInstances",
                "sagemaker:ListEndpoints"
            ],
            "Resource": "*"
        },
        {
            "Sid": "RequiredForAccess",
            "Effect": "Allow",
            "Action": [
                "sagemaker:ListDomains",
                "sagemaker:ListUserProfiles"
            ],
            "Resource": "*"
        },
        {
            "Sid": "CreatePresignedURLForAccessToDomain",
            "Effect": "Allow",
            "Action": "sagemaker:CreatePresignedDomainUrl",
            "Resource": "arn:aws:sagemaker:us-east-1:111122223333:user-profile/<STUDIO-DOMAIN-ID>/<PERSONA_NAME>"
        }
    ]
}
```

------

在 Studio Classic 控制面板中，选择**添加用户**创建新用户。在 **“常规设置”** 部分，为您的用户命名，并将该用户的**默认执行角色**设置为您使用 Amazon Role Manager 创建的 SageMaker 角色。

在下一个屏幕上，选择相应的 Jupyter Lab 版本，以及是否开启 SageMaker JumpStart 和 SageMaker AI Project 模板。然后选择**下一步**。在 SageMaker 画布设置页面上，选择是否启用 SageMaker 画布支持，以及是否允许在 Canva SageMaker s 中进行时间序列预测。然后，选择 **Submit (提交)**。

现在，您的新用户应该可以在 Studio Classic 控制面板中看到。要测试此用户，请从用户名所在行的**启动应用程序**下拉列表中选择 **Studio**。

## 利用 IAM 身份识别中心启动 Studio Classic
<a name="role-manager-launch-notebook-iam-identity-center"></a>

要将 IAM Identity Center 用户分配给执行角色，该用户必须先存在于 IAM Identity Center 目录中。有关更多信息，请参阅 *AWS IAM Identity Center* 中的[管理 IAM Identity Center 中的身份](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-identity-source-sso.html)。

**注意**  
IAM Identity Center 身份验证目录和 Studio Classic 域必须在同一个 AWS 区域中。

1. 要为 Studio Classic 域分配 IAM Identity Center 用户，请在 Studio Classic 控制面板中选择**分配用户和组**。在**分配用户和组**屏幕上，选择您的数据科学家用户，然后选择**分配用户和组**。

1. 将用户添加到 Studio Classic 控制面板后，选择该用户以打开用户详细信息屏幕。

1. 在**用户详细信息**屏幕上，选择**编辑**。

1. 在**编辑用户配置文件**屏幕的**常规设置**下，修改**默认执行角色**，使其与您为数据科学家创建的用户执行角色相匹配。

1. 选择**下一步**浏览其余设置页面，然后选择**提交**以保存更改。

当数据科学家或其他用户登录 IAM Identity Center 门户时，他们会看到该 Studio Classic 域的磁贴。选择磁贴后，他们就会以指定的用户执行角色登录 Studio Classic。

# 角色管理器 FAQs
<a name="role-manager-faqs"></a>

有关亚马逊 SageMaker 角色管理器的常见问题解答，请参阅以下常见问题解答。

## 问：如何访问 Amazon SageMaker 角色管理器？
<a name="role-manager-faqs-access"></a>

答：您可以通过亚马逊 A SageMaker I 控制台中的多个位置访问亚马逊 SageMaker 角色管理器。有关访问角色管理器并使用它来创建角色的信息，请参阅[使用角色管理器（控制台）](role-manager-tutorial.md)。

## 问：什么是角色？
<a name="role-manager-faqs-personas"></a>

答：角色是基于常见机器学习 (ML) 责任的预配置权限组。例如，数据科学角色建议在 SageMaker AI 环境中进行一般机器学习开发和实验的权限，而 MLOps 角色则建议拥有与操作相关的机器学习活动的权限。

## 问：什么是机器学习活动？
<a name="role-manager-faqs-ml-activities"></a>

答：机器学习活动是与使用 A SageMaker I 进行机器学习相关的常见 AWS 任务，需要特定的 IAM 权限。使用 Amazon SageMaker 角色管理器创建角色时，每个角色都会建议相关的机器学习活动。机器学习活动包括 Amazon S3 完全访问权限或搜索和可视化实验等任务。有关更多信息，请参阅 [机器学习活动参考](role-manager-ml-activities.md)。

## 问：我创建的角色是使用角色经理 AWS Identity and Access Management (IAM) 角色吗？
<a name="role-manager-faqs-iam"></a>

答：能。使用 Amazon SageMaker 角色管理器创建的角色是具有自定义访问策略的 IAM 角色。您可以在 [IAM 控制台](https://console.aws.amazon.com/iamv2/)的**角色**部分查看已创建的角色。

## 问：如何查看我使用 Amazon 角色管理器创建的 SageMaker 角色？
<a name="role-manager-faqs-view-roles"></a>

答：您可以在 [IAM 控制台](https://console.aws.amazon.com/iamv2/)的**角色**部分查看已创建的角色。默认情况下，每个角色名称都会添加前缀 `"sagemaker-"`，以便于在 IAM 控制台中搜索。例如，如果您在创建角色时将角色命名为 `test-123`，则您的角色将在 IAM 控制台中显示为 `sagemaker-test-123`。

## 问：使用 Amazon Role Manager 创建的 SageMaker 角色创建后，我能否对其进行修改？
<a name="role-manager-faqs-modify-roles"></a>

答：能。您可以通过 IA [M 控制台修改由 Amazon SageMaker 角色管理器创建的角色](https://console.aws.amazon.com/iamv2/)和策略。有关更多信息，请参阅《AWS Identity and Access Management 用户指南》**中的[修改角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_modify.html)。

## 问：我能否将自己的策略附加到使用 Amazon SageMaker Role Manager 创建的角色？
<a name="role-manager-faqs-attach-policies"></a>

答：能。您可以将账户中的任何 AWS 或客户管理的 IAM 策略附加到您使用 Amazon Role Manager 创建的 SageMaker 角色中。

## 问：我可以为使用 Amazon Role Manager 创建的 SageMaker 角色添加多少策略？
<a name="role-manager-faqs-policy-limit"></a>

答：最多可向 IAM 角色或用户附加 20 个托管策略。托管策略的最大字符数限制为 6144。有关更多信息，请参阅 [IAM 对象配额](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entities)和 [IAM 与 AWS Security Token Service 配额、名称要求和字符限制](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html)。

## 问：我能否为机器学习活动添加条件？
<a name="role-manager-faqs-conditions"></a>

答：您在 Amazon SageMaker 角色管理器中[步骤 1：输入角色信息](role-manager-tutorial.md#role-manager-tutorial-enter-role-information)提供的任何条件（例如子网、安全组或 KMS 密钥）都会自动传递给中[步骤 2：配置机器学习活动](role-manager-tutorial.md#role-manager-tutorial-configure-ml-activities)选定的任何机器学习活动。如有必要，您还可以将其他条件添加到机器学习活动。例如，您也可以向“管理训练作业”活动添加 `InstanceTypes` 或 `IntercontainerTrafficEncryption` 条件。

## 问：我能否使用标记来管理对任何 AWS 资源的访问权限？
<a name="role-manager-faqs-tagging"></a>

答：****您可以在 Amazon 角色管理器[步骤 3：添加其他策略和标签](role-manager-tutorial.md#role-manager-tutorial-add-policies-and-tags)中为自己的 SageMaker 角色添加标签。要使用标签成功管理 AWS 资源，必须为角色和所有关联策略添加相同的标签。例如，可以将标签添加到角色和 Amazon S3 存储桶。然后，由于该角色将标签传递给 SageMaker AI 会话，因此只有具有该角色的用户才能访问该 S3 存储桶。您可以通过 [IAM 控制台](https://console.aws.amazon.com/iamv2/)向策略添加标签。有关更多信息，请参阅《AWS Identity and Access Management 用户指南》**中的[标记 IAM 角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags_roles.html)。

## 问：我能否使用 Amazon SageMaker 角色管理器创建角色来访问？ AWS 管理控制台
<a name="role-manager-faqs-console-access"></a>

答：不能。但是，在角色管理器中创建服务角色后，您可以前往 IAM 控制台编辑该角色并在 IAM 控制台中添加人工访问角色。

## 问：用户联合角色和 A SageMaker I 执行角色有什么区别？
<a name="role-manager-faqs-role-types"></a>

答：用户直接代入用户联合身份验证角色来访问 AWS 资源，例如访问 AWS 管理控制台。A SageMaker I 服务担任 A SageMaker I 执行角色代表用户或自动化工具执行某项功能。例如，当用户打开 Studio Classic 实例时，Studio Classic 会承担与用户配置文件相关联的执行角色，以便代表用户访问 AWS 资源。如果用户配置文件未指定执行角色，则执行角色将在 Amazon A SageMaker I 域级别指定。

## 问：如果我使用的自定义网络应用程序通过预先指定的 URL 访问 Studio Classic，那么使用的是什么角色？
<a name="role-manager-faqs-studio-presigned-url"></a>

答：如果您使用自定义 Web 应用程序访问 Studio Classic，则您具有混合用户联合角色和 SageMaker AI 执行角色。确保该角色对用户可以做的事情和 Studio Classic 代表相关用户可以做的事情都具有最低权限。

## 问：我能否使用带有 AWS IAM 身份中心身份验证的 Amazon SageMaker 角色管理器来管理我的 Studio Classic 域名？
<a name="role-manager-faqs-iam-identity-center"></a>

答： AWS IAM Identity Center Studio Classic 云应用程序使用 Studio Classic 执行角色向联合用户授予权限。该执行角色可在 Studio Classic IAM Identity Center 用户配置文件级别或默认域级别指定。用户身份和群组必须同步到 IAM Identity Center，并且必须使用使用 IAM Identity Center 用户分配创建 Studio Classic 用户资料[CreateUserProfile](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateUserProfile.html)。有关更多信息，请参阅 [利用 IAM 身份识别中心启动 Studio Classic](role-manager-launch-notebook.md#role-manager-launch-notebook-iam-identity-center)。

# 笔记本的访问控制
<a name="security-access-control"></a>

您必须使用不同的程序来控制对 Amazon SageMaker Studio Classic SageMaker 笔记本和笔记本实例的访问权限，因为它们的运行环境不同。Studio Classic 使用文件系统权限和容器来控制对 Studio Classic 笔记本的访问和用户隔离。 SageMaker 笔记本实例为登录笔记本实例的用户提供了默认的根访问权限。以下主题介绍了如何更改两种笔记本的权限。

**Topics**
+ [SageMaker Studio 笔记本电脑的访问控制和权限设置](security-access-control-studio-nb.md)
+ [控制对 SageMaker 笔记本实例的 root 访问权限](nbi-root-access.md)

# SageMaker Studio 笔记本电脑的访问控制和权限设置
<a name="security-access-control-studio-nb"></a>

Amazon SageMaker Studio 使用文件系统和容器权限对 Studio 用户和笔记本电脑进行访问控制和隔离。这是 Studio 笔记本电脑和 SageMaker 笔记本实例之间的主要区别之一。本主题介绍如何设置权限以避免安全威胁、A SageMaker I 默认执行的操作以及客户如何自定义权限。有关 Studio 笔记本及其运行时环境的更多信息，请参阅[使用 Amazon SageMaker Studio 经典笔记本电脑](notebooks.md)。

**SageMaker AI 应用程序权限**

*用户运行身份*是 POSIX user/group ，用于在容器内运行 JupyterServer 应用程序和 KernelGateway 应用程序。

默认情况下，该 JupyterServer 应用程序的运行身份用户为 sagemaker-user (1000)。该用户拥有 sudo 权限，可以安装 yum 软件包等依赖项。

默认情况下， KernelGateway 应用程序的运行身份用户为 root (0)。此用户可以使用安装依赖关系pip/apt-get/conda。

由于用户重新映射，这两个用户均无法访问资源或更改主机实例。

**用户重新映射**

SageMaker AI 执行用户重新映射，将容器内的用户映射到容器外主机实例上的用户。容器中的用户范围 IDs （0-65535）将映射到实例 IDs 上超过 65535 的非特权用户。例如，容器内的 sagemaker-user (1000) 可能会映射到实例上的用户 (200001)，其中括号中的数字是用户 ID。如果客户在容器 user/group 内创建了一个新的容器，则无论 user/group 该 ID 如何，它都不会在主机实例上获得特权。容器的根用户也映射到实例上的非特权用户。有关更多信息，请参阅[使用用户命名空间隔离容器](https://docs.docker.com/engine/security/userns-remap/)。

**注意**  
由用户 sagemaker-user 创建的文件可能看起来像是由 sagemaker-studio (uid 65534) 所有。这是快速应用程序创建模式的副作用，在这种模式下， SageMaker AI 容器镜像是预先提取的，允许应用程序在不到一分钟的时间内启动。如果您的应用程序要求文件所有者 uid 和流程所有者 uid 相匹配，请要求客户服务部门将您的账号从映像预拉取特征中删除。

**自定义映像权限**

客户可以自带自定义 SageMaker 图片。这些图像可以指定不同的运行方式 user/group 来启动应用程序。 KernelGateway 客户可以在映像内部实施精细的权限控制，例如，禁用根访问权限或执行其他操作。用户重新映射在这里也适用。有关更多信息，请参阅 [亚马逊 SageMaker Studio 经典版中的自定义图片](studio-byoi.md)。

**容器隔离**

Docker 会保留容器可以使用的默认功能列表。 SageMaker AI 不会添加其他功能。 SageMaker AI 添加了特定的路由规则，以阻止来自容器的 Amazon EFS 和[实例元数据服务](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service) (IMDS) 的请求。客户无法在容器中更改这些路由规则。有关更多信息，请参阅[运行时权限和 Linux 功能](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities)。

**应用程序元数据访问权限**

正在运行的应用程序所使用的元数据以只读权限挂载到容器上。客户无法在容器中修改此元数据。有关可用的元数据，请参阅[获取 Amazon SageMaker Studio 经典版笔记本和应用程序元数据](notebooks-run-and-manage-metadata.md)。

**EFS 上的用户隔离**

当您加入 Studio 时， SageMaker AI 会为您的域创建一个亚马逊弹性文件系统 (EFS) 卷，该卷由该域中的所有 Studio 用户共享。每个用户在 EFS 卷上都有自己的私有主目录。此主目录用于存储用户的笔记本、Git 存储库和其他数据。为了防止网域中的其他用户访问用户的数据， SageMaker AI 为用户的个人资料创建了一个全局唯一的用户 ID，并将其作为用户主目录的 POSIX user/group ID 应用。

**EBS 访问权限**

Amazon Elastic Block Store (Amazon EBS) 卷附加到主机实例，并在所有映像之间共享。它用于笔记本的根卷，并存储容器内生成的临时数据。删除运行笔记本的实例后，存储不会持久化。容器内的根用户无法访问 EBS 卷。

**IMDS 访问权限**

出于安全考虑，Studio 中无法访问亚马逊弹性计算云 (Amazon EC2) 实例元数据服务 (IMDS)。 SageMaker 有关 IMDS 的更多信息，请参阅[实例元数据和用户数据](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)。

# 控制对 SageMaker 笔记本实例的 root 访问权限
<a name="nbi-root-access"></a>

默认情况下，当您创建一个笔记本实例时，登录该笔记本实例的用户将拥有根访问权限。数据科学是一个迭代过程，可能需要数据科学家测试和使用不同的软件工具和包，因此许多笔记本实例用户需要具有根访问权限才能安装这些工具和包。由于具有根访问权限的用户具有管理员权限，所以，用户可以在启用根访问权限的情况下，访问和编辑笔记本实例上的所有文件。

如果不希望用户对笔记本实例具有根访问权限，则在调用 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateNotebookInstance.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateNotebookInstance.html) 或 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateNotebookInstance.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateNotebookInstance.html) 操作时，将 `RootAccess` 字段设置为 `Disabled`。在 Amazon A SageMaker I 控制台中创建或更新笔记本实例时，您也可以禁用用户的根访问权限。有关信息，请参阅[为本教程创建 Amazon SageMaker 笔记本实例](gs-setup-working-env.md)。

**注意**  
生命周期配置需要根访问权限才能设置笔记本实例。因此，即使禁用了用户的根访问权限，与笔记本实例关联的生命周期配置也始终以根访问权限运行。

**注意**  
出于安全考虑，无根 Docker 安装在禁用了根的笔记本实例上，而不是普通 Docker 上。有关更多信息，请参阅[以非根用户身份运行 Docker 进程守护程序（无根模式）](https://docs.docker.com/engine/security/rootless/)

## 安全注意事项
<a name="nbi-root-access-security-considerations"></a>

生命周期配置脚本以根访问权限执行，并继承笔记本实例的 IAM 执行角色的全部权限。任何有权创建或修改生命周期配置以及管理笔记本实例的人（包括管理员）都可以使用执行角色的证书执行代码，因此请遵循以下最佳实践。

最佳实践：
+ 限制管理访问权限：仅向了解安全含义的可信管理员授予生命周期配置权限。
+ 应用最低权限原则：仅使用合法工作负载所需的最低权限来定义笔记本实例执行角色。
+ 启用监控：定期查看 CloudWatch 日志组中生命周期配置执行的日志`/aws/sagemaker/NotebookInstances`，以检测意外活动。
+ 实施变更控制：为生产环境中的生命周期配置更改建立批准流程。

# Amazon SageMaker AI API 权限：操作、权限和资源参考
<a name="api-permissions-reference"></a>

在设置访问控制和编写您可附加到 IAM 身份的权限策略 (基于身份的策略) 时，可以使用下表作为参考。该表列出了每个 SageMaker Amazon AI API 操作、您可以为其授予执行该操作的权限的相应操作，以及您可以为其授予权限的 AWS 资源。您可以在策略的 `Action` 字段中指定这些操作，并在策略的 `Resource` 字段中指定资源值。

**注意**  
除 `ListTags` API 外，资源级别限制在 `List-` 调用中不可用。任何调用 `List-` API 的用户都将看到账户中该类型的所有资源。

要在您的 Amazon SageMaker AI 政策中表达条件，您可以使用 AWS范围内的条件密钥。有关 AWS范围密钥的完整列表，请参阅《*服务授权参考*》中的[可用密钥](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_elements.html#AvailableKeys)。

**警告**  
某些 SageMaker API 操作可能仍可通过访问`[Search API](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Search.html)`。例如，如果用户的 IAM 策略拒绝`Describe`调用特定 A SageMaker I 资源的权限，则该用户仍然可以通过搜索 API 访问描述信息。要完全限制用户对 `Describe` 调用的访问，还必须限制对搜索 API 的访问权限。有关可通过搜索 AP SageMaker I 访问的 AI 资源列表，请参阅 [SageMaker AI 搜索 AWS CLI 命令参考](https://docs.aws.amazon.com/cli/latest/reference/sagemaker/search.html#options)。

使用滚动条查看表的其余部分。

Amazon SageMaker AI API 操作和操作所需的权限


****  

| 亚马逊 SageMaker AI API 操作 | 所需权限（API 操作） | 资源 | 
| --- | --- | --- | 
|  `[ DeleteEarthObservationJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_DeleteEarthObservationJob.html)`  |  `sagemaker-geospatial:DeleteEarthObservationJob`  |  `arn:aws:sagemaker-geospatial:region:account-id:earth-observation-job/id`  | 
|  `[ DeleteVectorEnrichmentJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_DeleteVectorEnrichmentJob.html)`  |  `sagemaker-geospatial:DeleteVectorEnrichmentJob`  |  `arn:aws:sagemaker-geospatial:region:account-id:vector-enrichment-job/id`  | 
|  `[ ExportEarthObservationJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_ExportEarthObservationJob.html)`  |  `sagemaker-geospatial:ExportEarthObservationJob`  |  `arn:aws:sagemaker-geospatial:region:account-id:earth-observation-job/id`  | 
|  `[ ExportVectorEnrichmentJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_ExportVectorEnrichmentJob.html)`  |  `sagemaker-geospatial:ExportVectorEnrichmentJob`  |  `arn:aws:sagemaker-geospatial:region:account-id:vector-enrichment-job/id`  | 
|  `[ GetEarthObservationJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_GetEarthObservationJob.html)`  |  `sagemaker-geospatial:GetEarthObservationJob`  |  `arn:aws:sagemaker-geospatial:region:account-id:earth-observation-job/id`  | 
|  `[ GetRasterDataCollection](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_DeleteEarthObservationJob.html)`  |  `sagemaker-geospatial:GetRasterDataCollection`  |  `arn:aws:sagemaker-geospatial:region:account-id:raster-data-collection/public/id`  | 
|  `[ GetTile](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_GetTile.html)`  |  `sagemaker-geospatial:GetTile`  |  `arn:aws:sagemaker-geospatial:region:account-id:earth-observation-job/id`  | 
|  `[ GetVectorEnrichmentJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_GetVectorEnrichmentJob.html)`  |  `sagemaker-geospatial:GetVectorEnrichmentJob`  |  `arn:aws:sagemaker-geospatial:region:account-id:vector-enrichment-job/id`  | 
|  `[ ListEarthObservationJobs](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_ListEarthObservationJobs.html)`  |  `sagemaker-geospatial:ListEarthObservationJobs`  |  `*`  | 
|  `[ ListRasterDataCollections](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_ListRasterDataCollections.html)`  |  `sagemaker-geospatial:ListRasterDataCollections`  |  `*`  | 
|  `[ ListTagsForResource](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_ListTagsForResource.html)`  |  `sagemaker-geospatial:ListTagsForResource`  |  `arn:aws:sagemaker-geospatial:region:account-id:earth-observation-job/id` `arn:aws:sagemaker-geospatial:region:account-id:vector-enrichment-job/id`  | 
|  `[ ListVectorEnrichmentJobs](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_ListVectorEnrichmentJobs.html)`  |  `sagemaker-geospatial:ListVectorEnrichmentJobs`  |  `*`  | 
|  `[ SearchRasterDataCollection](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_SearchRasterDataCollection.html)`  |  `sagemaker-geospatial:SearchRasterDataCollection`  |  `arn:aws:sagemaker-geospatial:region:account-id:raster-data-collection/public/id`  | 
|  `[ StartEarthObservationJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_StartEarthObservationJob.html)`  |  `sagemaker-geospatial:StartEarthObservationJob`  |  `arn:aws:sagemaker-geospatial:region:account-id:earth-observation-job/id`  | 
|  `[ StartVectorEnrichmentJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_StartVectorEnrichmentJob.html)`  |  `sagemaker-geospatial:StartVectorEnrichmentJob`  |  `arn:aws:sagemaker-geospatial:region:account-id:vector-enrichment-job/id`  | 
|  `[ StopEarthObservationJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_StopEarthObservationJob.html)`  |  `sagemaker-geospatial:StopEarthObservationJob`  |  `arn:aws:sagemaker-geospatial:region:account-id:earth-observation-job/id`  | 
|  `[ StopVectorEnrichmentJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_StopVectorEnrichmentJob.html)`  |  `sagemaker-geospatial:StopVectorEnrichmentJob`  |  `arn:aws:sagemaker-geospatial:region:account-id:vector-enrichment-job/id`  | 
|  `[ TagResource](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_TagResource.html)`  |  `sagemaker-geospatial:TagResource`  |  `arn:aws:sagemaker-geospatial:region:account-id:earth-observation-job/id` `arn:aws:sagemaker-geospatial:region:account-id:vector-enrichment-job/id`  | 
|  `[ UntagResource](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_UntagResource.html)`  |  `sagemaker-geospatial:UntagResource`  |  `arn:aws:sagemaker-geospatial:region:account-id:earth-observation-job/id` `arn:aws:sagemaker-geospatial:region:account-id:vector-enrichment-job/id`  | 
|  `[ AddTags](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AddTags.html)`  |  `sagemaker:AddTags`  |  `arn:aws:sagemaker:region:account-id:*`  | 
|  `[ CreateApp](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateApp.html)`  |  `sagemaker:CreateApp`  |  `arn:aws:sagemaker:region:account-id:app/domain-id/user-profile-name/app-type/appName`  | 
|  `[ CreateAppImageConfig](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAppImageConfig.html)`  |  `sagemaker:CreateAppImageConfig`  |  `arn:aws:sagemaker:region:account-id:app-image-config/appImageConfigName`  | 
|  `[ CreateAutoMLJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAutoMLJob.html)`  |  `sagemaker:CreateAutoMLJob` `iam:PassRole` 仅当任何关联的 `ResourceConfig` 具有指定的 `VolumeKmsKeyId ` 且关联角色没有允许此操作的策略时才需要以下权限： `kms:CreateGrant`   | arn:aws:sagemaker:region:account-id:automl-job/autoMLJobName | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAutoMLJobV2.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAutoMLJobV2.html)  |  `sagemaker:CreateAutoMLJobV2` `iam:PassRole` 仅当任何关联的 `ResourceConfig` 具有指定的 `VolumeKmsKeyId ` 且关联角色没有允许此操作的策略时才需要以下权限： `kms:CreateGrant`   | arn:aws:sagemaker:region:account-id:automl-job/autoMLJobName | 
|  `[ CreateDomain](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateDomain.html)`  |  `sagemaker:CreateDomain` `iam:CreateServiceLinkedRole` `iam:PassRole` 在为 `KmsKeyId` 指定了 KMS 客户托管密钥时需要： `elasticfilesystem:CreateFileSystem` `kms:CreateGrant` `kms:Decrypt` `kms:DescribeKey` `kms:GenerateDataKeyWithoutPlainText` 需要创建支持 RStudio以下内容的域名： `sagemaker:CreateApp`  |  `arn:aws:sagemaker:region:account-id:domain/domain-id`  | 
|  `[ CreateEndpoint](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html)`  |  `sagemaker:CreateEndpoint` `kms:CreateGrant` (仅当关联的 `EndPointConfig` 指定了 `KmsKeyId` 时才需要)  |  `arn:aws:sagemaker:region:account-id:endpoint/endpointName` `arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html)  |  `sagemaker:CreateEndpointConfig`  |  `arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateFlowDefinition.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateFlowDefinition.html)  |  `sagemaker:CreateFlowDefinition` `iam:PassRole`  |  `arn:aws:sagemaker:region:account-id:flow-definition/flowDefinitionName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateHumanTaskUi.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateHumanTaskUi.html)  |  `sagemaker:CreateHumanTaskUi`  |  `arn:aws:sagemaker:region:account-id:human-task-ui/humanTaskUiName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateInferenceRecommendationsJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateInferenceRecommendationsJob.html)  |  `sagemaker:CreateInferenceRecommendationsJob` `iam:PassRole` 仅当您指定加密密钥时，才需要以下权限： `kms:CreateGrant` `kms:Decrypt` `kms:DescribeKey` `kms:GenerateDataKey`  |  `arn:aws:sagemaker:region:account-id:inference-recommendations-job/inferenceRecommendationsJobName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateHyperParameterTuningJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateHyperParameterTuningJob.html)  |  `sagemaker:CreateHyperParameterTuningJob` `iam:PassRole` 仅当任何关联的 `ResourceConfig` 具有指定的 `VolumeKmsKeyId ` 且关联角色没有允许此操作的策略时才需要以下权限： `kms:CreateGrant`  |  `arn:aws:sagemaker:region:account-id:hyper-parameter-tuning-job/hyperParameterTuningJobName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateImage.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateImage.html)  |  `sagemaker:CreateImage` `iam:PassRole`  |  `arn:aws:sagemaker:region:account-id:image/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateImageVersion.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateImageVersion.html)  |  `sagemaker:CreateImageVersion`  |  `arn:aws:sagemaker:region:account-id:image-version/imageName/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html)  |  sagemaker：CreateLabelingJob 我是：PassRole  |  `arn:aws:sagemaker:region:account-id:labeling-job/labelingJobName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html)  |  `sagemaker:CreateModel` `iam:PassRole`  |  `arn:aws:sagemaker:region:account-id:model/modelName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModelPackage.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModelPackage.html)  |  `sagemaker:CreateModelPackage`  |  `arn:aws:sagemaker:region:account-id:model-package/modelPackageName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModelPackageGroup.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModelPackageGroup.html)  |  `sagemaker:CreateModelPackageGroup`  |  `arn:aws:sagemaker:region:account-id:model-package-group/modelPackageGroupName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateNotebookInstance.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateNotebookInstance.html)  |  `sagemaker:CreateNotebookInstance` `iam:PassRole` 仅当您为您的笔记本实例指定 VPC 时，才需要以下权限： `ec2:CreateNetworkInterface` `ec2:DescribeSecurityGroups` `ec2:DescribeSubnets` `ec2:DescribeVpcs` 仅当您指定加密密钥时，才需要以下权限： `kms:DescribeKey` `kms:CreateGrant` 仅当您指定 AWS Secrets Manager 密钥以访问私有 Git 存储库时，才需要以下权限： `secretsmanager:GetSecretValue`  |  `arn:aws:sagemaker:region:account-id:notebook-instance/notebookInstanceName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreatePipeline.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreatePipeline.html)  |  `sagemaker:CreatePipeline` `iam:PassRole`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name` `arn:aws-partition:iam::account-id:role/role-name`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreatePresignedDomainUrl.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreatePresignedDomainUrl.html)  |  `sagemaker:CreatePresignedDomainUrl`  |  `arn:aws:sagemaker:region:account-id:app/domain-id/userProfileName`/\$1  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreatePresignedNotebookInstanceUrl.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreatePresignedNotebookInstanceUrl.html)  |  `sagemaker:CreatePresignedNotebookInstanceUrl`  |  `arn:aws:sagemaker:region:account-id:notebook-instance/notebookInstanceName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html)  |  `sagemaker:CreateProcessingJob` `iam:PassRole` `kms:CreateGrant`（仅当关联的 `ProcessingResources` 具有一个指定的 `VolumeKmsKeyId` 且关联角色没有允许此操作的策略时才必需） `ec2:CreateNetworkInterface`（仅在指定 VPC 时才需要）  |  `arn:aws:sagemaker:region:account-id:processing-job/processingJobName`  | 
|  `[ CreateSpace](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateSpace.html)`  |  `sagemaker:CreateSpace`  |  `arn:aws:sagemaker:region:account-id:space/domain-id/spaceName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateStudioLifecycleConfig.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateStudioLifecycleConfig.html)  |  `sagemaker:CreateStudioLifecycleConfig`  |  `arn:aws:sagemaker:region:account-id:studio-lifecycle-config/.*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html)  |  `sagemaker:CreateTrainingJob` `iam:PassRole` `kms:CreateGrant`（仅当关联的 `ResourceConfig` 具有一个指定的 `VolumeKmsKeyId` 且关联角色没有允许此操作的策略时才必需）  |  `arn:aws:sagemaker:region:account-id:training-job/trainingJobName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingPlan.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingPlan.html)  |  `sagemaker:CreateTrainingPlan` `sagemaker:CreateReservedCapacity` `sagemaker:AddTags`  |  `arn:aws:sagemaker:region:account-id:training-plan/*"` `arn:aws:sagemaker:region:account-id:reserved-capacity/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html)  |  `sagemaker:CreateTransformJob` `kms:CreateGrant`（仅当关联的 `TransformResources` 具有一个指定的 `VolumeKmsKeyId` 且关联角色没有允许此操作的策略时才必需）  |  `arn:aws:sagemaker:region:account-id:transform-job/transformJobName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateUserProfile.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateUserProfile.html)  |  `sagemaker:CreateUserProfile` `iam:PassRole`  |  `arn:aws:sagemaker:region:account-id:user-profile/domain-id/userProfileName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateWorkforce.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateWorkforce.html)  |  `sagemaker:CreateWorkforce` `cognito-idp:DescribeUserPoolClient` `cognito-idp:UpdateUserPool` `cognito-idp:DescribeUserPool` `cognito-idp:UpdateUserPoolClient`  | arn:aws:sagemaker:region:account-id:workforce/\$1 | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateWorkteam.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateWorkteam.html)  |  `sagemaker:CreateWorkteam` `cognito-idp:DescribeUserPoolClient` `cognito-idp:UpdateUserPool` `cognito-idp:DescribeUserPool` `cognito-idp:UpdateUserPoolClient`  |  `arn:aws:sagemaker:region:account-id:workteam/private-crowd/work team name`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteApp.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteApp.html)  |  `sagemaker:DeleteApp`  |  `arn:aws:sagemaker:region:account-id:app/domain-id/user-profile-name/app-type/appName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteAppImageConfig.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteAppImageConfig.html)  |  `sagemaker:DeleteAppImageConfig`  |  `arn:aws:sagemaker:region:account-id:app-image-config/appImageConfigName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteDomain.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteDomain.html)  |  `sagemaker:DeleteDomain`  |  `arn:aws:sagemaker:region:account-id:domain/domainId`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteEndpoint.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteEndpoint.html)  |  `sagemaker:DeleteEndpoint`  |  `arn:aws:sagemaker:region:account-id:endpoint/endpointName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteEndpointConfig.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteEndpointConfig.html)  |  `sagemaker:DeleteEndpointConfig`  |  `arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteFlowDefinition.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteFlowDefinition.html)  |  `sagemaker:DeleteFlowDefinition`  |  `arn:aws:sagemaker:region:account-id:flow-definition/flowDefinitionName`  | 
|  `[DeleteHumanLoop](https://docs.aws.amazon.com/augmented-ai/2019-11-07/APIReference/API_DeleteHumanLoop.html)`  |  `sagemaker:DeleteHumanLoop`  |  `arn:aws:sagemaker:region:account-id:human-loop/humanLoopName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteImage.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteImage.html)  |  `sagemaker:DeleteImage`  |  `arn:aws:sagemaker:region:account-id:image/imageName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteImageVersion.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteImageVersion.html)  |  `sagemaker:DeleteImageVersion`  |  `arn:aws:sagemaker:region:account-id:image-version/imageName/versionNumber`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteModel.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteModel.html)  |  `sagemaker:DeleteModel`  |  `arn:aws:sagemaker:region:account-id:model/modelName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteModelPackage.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteModelPackage.html)  |  `sagemaker:DeleteModelPackage`  |  `arn:aws:sagemaker:region:account-id:model-package/modelPackageName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteModelPackageGroup.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteModelPackageGroup.html)  |  `sagemaker:DeleteModelPackageGroup`  |  `arn:aws:sagemaker:region:account-id:model-package-group/modelPackageGroupName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteModelPackageGroupPolicy.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteModelPackageGroupPolicy.html)  |  `sagemaker:DeleteModelPackageGroupPolicy`  |  `arn:aws:sagemaker:region:account-id:model-package-group/modelPackageGroupName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteNotebookInstance.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteNotebookInstance.html)  |  `sagemaker:DeleteNotebookInstance` 仅当您为您的笔记本实例指定 VPC 时，才需要以下权限： `ec2:DeleteNetworkInterface` 仅当您在创建笔记本实例时指定了加密密钥的情况下，才需要以下权限： `kms:DescribeKey`  |  `arn:aws:sagemaker:region:account-id:notebook-instance/notebookInstanceName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeletePipeline.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeletePipeline.html)  |  `sagemaker:DeletePipeline`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name`  | 
|  `[DeleteSpace](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteSpace.html)`  |  `sagemaker:DeleteSpace`  |  `arn:aws:sagemaker:region:account-id:space/domain-id/spaceName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteTags.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteTags.html)  |  `sagemaker:DeleteTags`  |  `arn:aws:sagemaker:region:account-id:*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteUserProfile.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteUserProfile.html)  |  `sagemaker:DeleteUserProfile`  |  `arn:aws:sagemaker:region:account-id:user-profile/domain-id/userProfileName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteWorkforce.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteWorkforce.html)  |  `sagemaker:DeleteWorkforce`  |  `arn:aws:sagemaker:region:account-id:workforce/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteWorkteam.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteWorkteam.html)  |  `sagemaker:DeleteWorkteam`  |  `arn:aws:sagemaker:region:account-id:workteam/private-crowd/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeApp.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeApp.html)  |  `sagemaker:DescribeApp`  |  `arn:aws:sagemaker:region:account-id:app/domain-id/user-profile-name/app-type/appName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAppImageConfig.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAppImageConfig.html)  |  `sagemaker:DescribeAppImageConfig`  |  `arn:aws:sagemaker:region:account-id:app-image-config/appImageConfigName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJob.html)  |  `sagemaker:DescribeAutoMLJob`  | arn:aws:sagemaker:region:account-id:automl-job/autoMLJobName | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJobV2.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJobV2.html)  |  `sagemaker:DescribeAutoMLJobV2`  | arn:aws:sagemaker:region:account-id:automl-job/autoMLJobName | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeDomain.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeDomain.html)  |  `sagemaker:DescribeDomain`  |  `arn:aws:sagemaker:region:account-id:domain/domainId`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeEndpoint.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeEndpoint.html)  |  `sagemaker:DescribeEndpoint`  |  `arn:aws:sagemaker:region:account-id:endpoint/endpointName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeEndpointConfig.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeEndpointConfig.html)  |  `sagemaker:DescribeEndpointConfig`  |  `arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeFlowDefinition.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeFlowDefinition.html)  |  `sagemaker:DescribeFlowDefinition`  |  `arn:aws:sagemaker:region:account-id:flow-definition/flowDefinitionName`  | 
|  `[DescribeHumanLoop](https://docs.aws.amazon.com/augmented-ai/2019-11-07/APIReference/API_DescribeHumanLoop.html)`  |  `sagemaker:DescribeHumanLoop`  |  `arn:aws:sagemaker:region:account-id:human-loop/humanLoopName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeHumanTaskUi.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeHumanTaskUi.html)  |  `sagemaker:DescribeHumanTaskUi`  |  `arn:aws:sagemaker:region:account-id:human-task-ui/humanTaskUiName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeHyperParameterTuningJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeHyperParameterTuningJob.html)  |  `sagemaker:DescribeHyperParameterTuningJob`  |  `arn:aws:sagemaker:region:account-id:hyper-parameter-tuning-job/hyperParameterTuningJob`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeImage.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeImage.html)  |  `sagemaker:DescribeImage`  |  `arn:aws:sagemaker:region:account-id:image/imageName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeImageVersion.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeImageVersion.html)  |  `sagemaker:DescribeImageVersion`  |  `arn:aws:sagemaker:region:account-id:image-version/imageName/versionNumber`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeLabelingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeLabelingJob.html)  |  `sagemaker:DescribeLabelingJob`  |  `arn:aws:sagemaker:region:account-id:labeling-job/labelingJobName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModel.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModel.html)  |  `sagemaker:DescribeModel`  |  `arn:aws:sagemaker:region:account-id:model/modelName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModelPackage.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModelPackage.html)  |  `sagemaker:DescribeModelPackage`  |  `arn:aws:sagemaker:region:account-id:model-package/modelPackageName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModelPackageGroup.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModelPackageGroup.html)  |  `sagemaker:DescribeModelPackageGroup`  |  `arn:aws:sagemaker:region:account-id:model-package-group/modelPackageGroupName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeNotebookInstance.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeNotebookInstance.html)  |  `sagemaker:DescribeNotebookInstance `  |  `arn:aws:sagemaker:region:account-id:notebook-instance/notebookInstanceName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribePipeline.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribePipeline.html)  |  `sagemaker:DescribePipeline`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribePipelineDefinitionForExecution.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribePipelineDefinitionForExecution.html)  |  `sagemaker:DescribePipelineDefinitionForExecution`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name/execution/execution-id`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribePipelineExecution.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribePipelineExecution.html)  |  `sagemaker:DescribePipelineExecution`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name/execution/execution-id`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeProcessingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeProcessingJob.html)  |  `sagemaker:DescribeProcessingJob`  |  `arn:aws:sagemaker:region:account-id:processing-job/processingjobname`  | 
|  `[DescribeSpace](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeSpace.html)`  |  `sagemaker:DescribeSpace`  |  `arn:aws:sagemaker:region:account-id:space/domain-id/spaceName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeSubscribedWorkteam.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeSubscribedWorkteam.html)  |  `sagemaker:DescribeSubscribedWorkteam` `aws-marketplace:ViewSubscriptions`  |  `arn:aws:sagemaker:region:account-id:workteam/vendor-crowd/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeTrainingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeTrainingJob.html)  |  `sagemaker:DescribeTrainingJob`  |  `arn:aws:sagemaker:region:account-id:training-job/trainingjobname`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeTransformJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeTransformJob.html)  |  `sagemaker:DescribeTransformJob`  |  `arn:aws:sagemaker:region:account-id:transform-job/transformjobname`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeUserProfile.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeUserProfile.html)  |  `sagemaker:DescribeUserProfile`  |  `arn:aws:sagemaker:region:account-id:user-profile/domain-id/userProfileName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeWorkforce.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeWorkforce.html)  |  `sagemaker:DescribeWorkforce`  |  `arn:aws:sagemaker:region:account-id:workforce/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeWorkteam.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeWorkteam.html)  |  `sagemaker:DescribeWorkteam`  |  `arn:aws:sagemaker:region:account-id:workteam/private-crowd/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_GetModelPackageGroupPolicy.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_GetModelPackageGroupPolicy.html)  |  `sagemaker:GetModelPackageGroupPolicy`  |  `arn:aws:sagemaker:region:account-id:model-package-group/modelPackageGroupName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html)  |  `sagemaker:InvokeEndpoint`  |  `arn:aws:sagemaker:region:account-id:endpoint/endpointName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListAppImageConfigs.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListAppImageConfigs.html)  |  `sagemaker:ListAppImageConfigs`  |  `arn:aws:sagemaker:region:account-id:app-image-config/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListApps.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListApps.html)  |  `sagemaker:ListApps`  |  `arn:aws:sagemaker:region:account-id:app/domain-id/user-profile-name/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListDomains.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListDomains.html)  |  `sagemaker:ListDomains`  |  `arn:aws:sagemaker:region:account-id:domain/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListEndpointConfigs.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListEndpointConfigs.html)  |  `sagemaker:ListEndpointConfigs`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListEndpoints.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListEndpoints.html)  |  `sagemaker:ListEndpoints`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListFlowDefinitions.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListFlowDefinitions.html)  |  `sagemaker:ListFlowDefinitions`  |  `*`  | 
|  `[ListHumanLoops](https://docs.aws.amazon.com/augmented-ai/2019-11-07/APIReference/API_ListHumanLoops.html)`  |  `sagemaker:ListHumanLoops`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListHumanTaskUis.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListHumanTaskUis.html)  |  `sagemaker:ListHumanTaskUis`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListHyperParameterTuningJobs.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListHyperParameterTuningJobs.html)  |  `sagemaker:ListHyperParameterTuningJobs`  |  `arn:aws:sagemaker:region:account-id:hyper-parameter-tuning-job/hyperParameterTuningJob`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListImages.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListImages.html)  |  `sagemaker:ListImages`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListImageVersions.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListImageVersions.html)  |  `sagemaker:ListImageVersions`  |  `arn:aws:sagemaker:region:account-id:image/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListLabelingJobs.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListLabelingJobs.html)  |  `sagemaker:ListLabelingJobs`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListLabelingJobsForWorkteam.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListLabelingJobsForWorkteam.html)  |  `sagemaker:ListLabelingJobForWorkteam`  |  `*`  | 
|  `[ ListModelPackageGroups](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListModelPackageGroups.html)`  |  `sagemaker:ListModelPackageGroups`  |  `arn:aws:sagemaker:region:account-id :model-package-group/ModelPackageGroupName`  | 
|  `[ ListModelPackages](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListModelPackages.html)`  |  `sagemaker:ListModelPackages`  |  `arn:aws:sagemaker:region:account-id :model-package/ModelPackageName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListModels.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListModels.html)  |  `sagemaker:ListModels`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListNotebookInstances.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListNotebookInstances.html)  |  `sagemaker:ListNotebookInstances`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListPipelineExecutions.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListPipelineExecutions.html)  |  `sagemaker:ListPipelineExecutions`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListPipelineExecutionSteps.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListPipelineExecutionSteps.html)  |  `sagemaker:ListPipelineExecutionSteps`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name/execution/execution-id`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListPipelineParametersForExecution.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListPipelineParametersForExecution.html)  |  `sagemaker:ListPipelineParametersForExecution`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name/execution/execution-id`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListPipelines.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListPipelines.html)  |  `sagemaker:ListPipelines`  | \$1 | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListProcessingJobs.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListProcessingJobs.html)  |  `sagemaker:ListProcessingJobs`  |  `*`  | 
|  `[ListSpaces](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListSpaces.html)`  |  `sagemaker:ListSpaces`  |  `arn:aws:sagemaker:region:account-id:space/domain-id/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListSubscribedWorkteams.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListSubscribedWorkteams.html)  |  `sagemaker:ListSubscribedWorkteams` `aws-marketplace:ViewSubscriptions`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListTags.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListTags.html)  |  `sagemaker:ListTags`  |  `arn:aws:sagemaker:region:account-id:*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListTrainingJobs.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListTrainingJobs.html)  |  `sagemaker:ListTrainingJobs`  |  `*`  | 
|  `[ ListTrainingJobsForHyperParameterTuningJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListTrainingJobsForHyperParameterTuningJob.html)`  |  `sagemaker:ListTrainingJobsForHyperParameterTuningJob`  |  `arn:aws:sagemaker:region:account-id:hyper-parameter-tuning-job/hyperParameterTuningJob`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListTransformJobs.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListTransformJobs.html)  |  `sagemaker:ListTransformJobs`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListUserProfiles.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListUserProfiles.html)  |  `sagemaker:ListUserProfiles`  |  `arn:aws:sagemaker:region:account-id:user-profile/domain-id/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListWorkforces.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListWorkforces.html)  |  `sagemaker:ListWorkforces`  | \$1 | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListWorkteams.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListWorkteams.html)  |  `sagemaker:ListWorkteams`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_PutModelPackageGroupPolicy.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_PutModelPackageGroupPolicy.html)  |  `sagemaker:PutModelPackageGroupPolicy`  |  `arn:aws:sagemaker:region:account-id:model-package-group/modelPackageGroupName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_RetryPipelineExecution.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_RetryPipelineExecution.html)  |  `sagemaker:RetryPipelineExecution`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name/execution/execution-id`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Search.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Search.html)  |  `sagemaker:Search`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_SendPipelineExecutionStepFailure.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_SendPipelineExecutionStepFailure.html)  |  `sagemaker:SendPipelineExecutionStepFailure`  |  `*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_SendPipelineExecutionStepSuccess.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_SendPipelineExecutionStepSuccess.html)  |  `sagemaker:SendPipelineExecutionStepSuccess`  |  `*`  | 
|  `[StartHumanLoop](https://docs.aws.amazon.com/augmented-ai/2019-11-07/APIReference/API_StartHumanLoop.html)`  |  `sagemaker:StartHumanLoop`  |  `arn:aws:sagemaker:region:account-id:human-loop/humanLoopName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StartNotebookInstance.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StartNotebookInstance.html)  |  `sagemaker:StartNotebookInstance` 仅当您在创建笔记本实例时指定了 VPC 的情况下，才需要以下权限： `ec2:CreateNetworkInterface` `ec2:DescribeNetworkInterfaces` `ec2:DescribeSecurityGroups` `ec2:DescribeSubnets` `ec2:DescribeVpcs` 仅当您在创建笔记本实例时指定了加密密钥的情况下，才需要以下权限： `kms:DescribeKey` `kms:CreateGrant` 仅当您在创建笔记本实例时指定了 AWS Secrets Manager 密钥以访问私有 Git 存储库时，才需要以下权限： `secretsmanager:GetSecretValue`  |  `arn:aws:sagemaker:region:account-id:notebook-instance/notebookInstanceName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StartPipelineExecution.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StartPipelineExecution.html)  |  `sagemaker:StartPipelineExecution`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name`  | 
|  `[StopHumanLoop](https://docs.aws.amazon.com/augmented-ai/2019-11-07/APIReference/API_StopHumanLoop.html)`  |  `sagemaker:StopHumanLoop`  |  `arn:aws:sagemaker:region:account-id:human-loop/humanLoopName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopHyperParameterTuningJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopHyperParameterTuningJob.html)  |  `sagemaker:StopHyperParameterTuningJob`  |  `arn:aws:sagemaker:region:account-id:hyper-parameter-tuning-job/hyperParameterTuningJob`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopLabelingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopLabelingJob.html)  |  `sagemaker:StopLabelingJob`  |  `arn:aws:sagemaker:region:account-id:labeling-job/labelingJobName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopNotebookInstance.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopNotebookInstance.html)  |  `sagemaker:StopNotebookInstance`  |  `arn:aws:sagemaker:region:account-id:notebook-instance/notebookInstanceName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopPipelineExecution.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopPipelineExecution.html)  |  `sagemaker:StopPipelineExecution`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name/execution/execution-id`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopProcessingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopProcessingJob.html)  |  `sagemaker:StopProcessingJob`  |  `arn:aws:sagemaker:region:account-id:processing-job/processingJobName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopTrainingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopTrainingJob.html)  |  `sagemaker:StopTrainingJob`  |  `arn:aws:sagemaker:region:account-id:training-job/trainingJobName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopTransformJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopTransformJob.html)  |  `sagemaker:StopTransformJob`  |  `arn:aws:sagemaker:region:account-id:transform-job/transformJobName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateAppImageConfig.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateAppImageConfig.html)  |  `sagemaker:UpdateAppImageConfig`  |  `arn:aws:sagemaker:region:account-id:app-image-config/appImageConfigName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateDomain.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateDomain.html)  |  `sagemaker:UpdateDomain`  |  `arn:aws:sagemaker:region:account-id:domain/domainId`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateEndpoint.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateEndpoint.html)  |  `sagemaker:UpdateEndpoint`  |  `arn:aws:sagemaker:region:account-id:endpoint/endpointName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateEndpointWeightsAndCapacities.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateEndpointWeightsAndCapacities.html)  |  `sagemaker:UpdateEndpointWeightsAndCapacities`  |  `arn:aws:sagemaker:region:account-id:endpoint/endpointName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateImage.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateImage.html)  |  `sagemaker:UpdateImage` `iam:PassRole`  |  `arn:aws:sagemaker:region:account-id:image/imageName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateModelPackage.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateModelPackage.html)  |  `sagemaker:UpdateModelPackage`  |  `arn:aws:sagemaker:region:account-id:model-package/modelPackageName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateNotebookInstance.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateNotebookInstance.html)  |  `sagemaker:UpdateNotebookInstance` `iam:PassRole`  |  `arn:aws:sagemaker:region:account-id:notebook-instance/notebookInstanceName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdatePipeline.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdatePipeline.html)  |  `sagemaker:UpdatePipeline` `iam:PassRole`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name` `arn:aws-partition:iam::account-id:role/role-name`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdatePipelineExecution.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdatePipelineExecution.html)  |  `sagemaker:UpdatePipelineExecution`  |  `arn:aws-partition:sagemaker:region:account-id:pipeline/pipeline-name/execution/execution-id`  | 
|  `[UpdateSpace](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateSpace.html)`  |  `sagemaker:UpdateSpace`  |  `arn:aws:sagemaker:region:account-id:space/domain-id/spaceName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateUserProfile.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateUserProfile.html)  |  `sagemaker:UpdateUserProfile`  |  `arn:aws:sagemaker:region:account-id:user-profile/domain-id/userProfileName`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateWorkforce.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateWorkforce.html)  |  `sagemaker:UpdateWorkforce`  |  `arn:aws:sagemaker:region:account-id:workforce/*`  | 
|  [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateWorkteam.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateWorkteam.html)  |  `sagemaker:UpdateWorkteam`  |  `arn:aws:sagemaker:region:account-id:workteam/private-crowd/*`  | 



# AWS 亚马逊 A SageMaker I 的托管策略
<a name="security-iam-awsmanpol"></a>

要向用户、群组和角色添加权限，使用 AWS 托管策略比自己编写策略要容易得多。创建仅为团队提供所需权限的 [IAM 客户管理型策略](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create-console.html)需要时间和专业知识。要快速入门，您可以使用我们的 AWS 托管策略。这些政策涵盖常见用例，可在您的 AWS 账户中使用。有关 AWS 托管策略的更多信息，请参阅 *IAM 用户指南*中的[AWS 托管策略](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies)。

AWS 服务维护和更新 AWS 托管策略。您无法更改 AWS 托管策略中的权限。服务偶尔会向 AWS 托管式策略添加额外权限以支持新特征。此类更新会影响附加策略的所有身份（用户、组和角色）。当启动新特征或新操作可用时，服务最有可能会更新 AWS 托管式策略。服务不会从 AWS 托管策略中移除权限，因此策略更新不会破坏您的现有权限。

此外，还 AWS 支持跨多个服务的工作职能的托管策略。例如，`ReadOnlyAccess` AWS 托管策略提供对所有 AWS 服务和资源的只读访问权限。当服务启动一项新功能时， AWS 会为新操作和资源添加只读权限。有关工作职能策略的列表和说明，请参阅 *IAM 用户指南*中的[适用于工作职能的AWS 托管式策略](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html)。

**重要**  
我们建议您使用允许执行使用案例的最严格的策略。

以下 AWS 托管策略仅适用于 Amazon A SageMaker I，您可以将其附加到账户中的用户：
+ **`AmazonSageMakerFullAccess`**— 授予对 Amazon A SageMaker I 和 A SageMaker I 地理空间资源以及支持的操作的完全访问权限。这不提供无限制的 Amazon S3 访问权限，但支持具有特定 `sagemaker` 标签的存储桶和对象。此策略允许将所有 IAM 角色传递给 Amazon A SageMaker I，但仅允许将其中带有 AmazonSageMaker “” 的 IAM 角色传递给 AWS Glue AWS Step Functions、和 AWS RoboMaker 服务。
+ **`AmazonSageMakerReadOnly`**— 授予对 Amazon A SageMaker I 资源的只读访问权限。

以下 AWS 托管策略可以附加到您账户中的用户，但不建议这样做：
+ [https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html#jf_administrator](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html#jf_administrator) – 为所有 AWS 服务和账户中的所有资源授予所有操作权限。
+ [https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html#jf_data-scientist](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html#jf_data-scientist) – 授予广泛的权限，以涵盖数据科学家所遇到的大多数使用案例（主要用于分析和商业智能）。

您可以通过登录到 IAM 控制台并搜索这些权限策略来查看它们。

您也可以创建自己的自定义 IAM 策略，根据需要授予对 SageMaker Amazon AI 操作和资源的权限。您可以将这些自定义策略附加到需要它们的用户或组。

**Topics**
+ [AWS 托管策略： AmazonSageMakerFullAccess](#security-iam-awsmanpol-AmazonSageMakerFullAccess)
+ [AWS 托管策略： AmazonSageMakerReadOnly](#security-iam-awsmanpol-AmazonSageMakerReadOnly)
+ [AWS 亚马逊 C SageMaker anvas 的托管政策](security-iam-awsmanpol-canvas.md)
+ [AWS Amazon SageMaker 特色商店的托管政策](security-iam-awsmanpol-feature-store.md)
+ [AWS Amazon SageMaker 地理空间的托管政策](security-iam-awsmanpol-geospatial.md)
+ [AWS 亚马逊 G SageMaker round Truth 的托管政策](security-iam-awsmanpol-ground-truth.md)
+ [AWS Amazon 的托管政策 SageMaker HyperPod](security-iam-awsmanpol-hyperpod.md)
+ [AWS 用于 SageMaker AI 模型治理的托管策略](security-iam-awsmanpol-governance.md)
+ [AWS 模型注册管理机构的托管策略](security-iam-awsmanpol-model-registry.md)
+ [AWS SageMaker 笔记本电脑的托管策略](security-iam-awsmanpol-notebooks.md)
+ [AWS Amazon SageMaker 合作伙伴 AI 应用程序的托管政策](security-iam-awsmanpol-partner-apps.md)
+ [AWS 管 SageMaker 道的托管策略](security-iam-awsmanpol-pipelines.md)
+ [AWS SageMaker 培训计划的托管策略](security-iam-awsmanpol-training-plan.md)
+ [AWS SageMaker 项目管理策略和 JumpStart](security-iam-awsmanpol-sc.md)
+ [SageMaker AWS 托管策略的 AI 更新](#security-iam-awsmanpol-updates)

## AWS 托管策略： AmazonSageMakerFullAccess
<a name="security-iam-awsmanpol-AmazonSageMakerFullAccess"></a>

该策略授予管理权限，允许委托人完全访问所有 Amazon SageMaker AI 和 SageMaker AI 地理空间资源和操作。该策略还提供对相关服务的部分访问权限。此策略允许将所有 IAM 角色传递给 Amazon A SageMaker I，但仅允许将其中带有 AmazonSageMaker “” 的 IAM 角色传递给 AWS Glue AWS Step Functions、和 AWS RoboMaker 服务。该政策不包括创建 Amazon A SageMaker I 域的权限。有关创建域所需策略的信息，请参阅[完成 Amazon A SageMaker I 先决条件](gs-set-up.md)。

**权限详细信息**

该策略包含以下权限。
+ `application-autoscaling`— 允许委托人自动扩展 A SageMaker I 实时推理端点。
+ `athena`— 允许委托人从中查询数据目录、数据库和表元数据的列表。 Amazon Athena
+ `aws-marketplace`— 允许委托人查看 AWS AI Marketplace 订阅。如果您想访问中订阅的 SageMaker AI 软件，则需要此选项。 AWS Marketplace
+ `cloudformation`— 允许校长获取用于使用 SageMaker AI JumpStart 解决方案和管道的 AWS CloudFormation 模板。 SageMaker AI JumpStart 创造了运行将 SageMaker 人工智能与其他 AWS 服务联系起来的 end-to-end机器学习解决方案所必需的资源。 SageMaker AI Pipelines 创建由 Service Catalog 支持的新项目。
+ `cloudwatch`— 允许委托人发布 CloudWatch 指标、与警报交互以及将日志上传到您账户中的 CloudWatch 日志。
+ `codebuild`— 允许委托人存储 SageMaker AI 管道和项目的 AWS CodeBuild 工件。
+ `codecommit`— 需要与 SageMaker AI 笔记本实例 AWS CodeCommit 集成。
+ `cognito-idp`— Amazon G SageMaker round Truth 需要定义私人员工和工作团队。
+ `ec2`— 当您为 SageMaker AI 任务、模型、终端节点和笔记本实例指定 Amazon VPC 时， SageMaker AI 需要管理 Amazon EC2 资源和网络接口。
+ `ecr`— 需要提取和存储 Amazon SageMaker Studio Classic（自定义映像）、训练、处理、批量推理和推理终端节点的 Docker 工件。在 SageMaker AI 中使用自己的容器也需要这样做。要代表用户创建和移除自定义映像，还需要获得 SageMaker AI JumpStart 解决方案的额外权限。
+ `elasticfilesystem` - 允许主体访问 Amazon Elastic File System。这是 SageMaker 人工智能使用 Amazon Elastic File System 中的数据源来训练机器学习模型所必需的。
+ `fsx`— 允许委托人访问亚马逊 FSx。这是 SageMaker AI 使用 Amazon 中的数据源训练机器学习模型 FSx 所必需的。
+ `glue`— 需要在 SageMaker AI 笔记本实例中进行推理管道预处理。
+ `groundtruthlabeling` - Ground Truth 标注作业所需。可通过 Ground Truth 控制台访问 `groundtruthlabeling` 端点。
+ `iam`— 需要向 SageMaker AI 控制台授予对可用 IAM 角色的访问权限并创建与服务相关的角色。
+ `kms`— 需要让 SageMaker AI 控制台访问可用 AWS KMS 密钥并检索任务和终端节点中任何指定 AWS KMS 别名的密钥。
+ `lambda` - 允许主体调用和获取 AWS Lambda 函数列表。
+ `logs`— 需要允许 SageMaker AI 作业和端点发布日志流。
+ `redshift` - 允许主体访问 Amazon Redshift 集群凭证。
+ `redshift-data` - 允许主体使用 Amazon Redshift 中的数据来运行、描述和取消语句；获取语句结果；以及列出架构和表。
+ `robomaker`— 允许委托人拥有创建、获取描述和删除 AWS RoboMaker 仿真应用程序和作业的完全访问权限。这也是在笔记本实例上运行强化学习示例时所需。
+ `s3, s3express`— 允许委托人完全访问与 SageMaker 人工智能相关的亚马逊 S3 和 Amazon S3 Express 资源，但不能完全访问所有亚马逊 S3 或 Amazon S3 Express 资源。
+ `sagemaker`— 允许委托人在 SageMaker AI 用户个人资料上列出标签，并向 SageMaker AI 应用程序和空间添加标签。仅允许访问 sagemaker 的 SageMaker AI 流程定义：WorkteamType “私人人群” 或 “供应商人群”。允许在所有可访问训练计划功能的 AWS 区域中使用和描述 SageMaker AI SageMaker 训练计划和预留容量，以及训练作业和 SageMaker HyperPod集群。
+ `sagemaker`和 `sagemaker-geospatial` — 允许委托人对 SageMaker AI 域和用户配置文件进行只读访问。
+ `secretsmanager` - 允许主体完全访问 AWS Secrets Manager。主体可以安全地加密、存储和检索数据库和其他服务的凭证。对于使用的 SageMaker AI 代码存储库的 A SageMaker I 笔记本实例，也需要这样做 GitHub。
+ `servicecatalog` - 允许主体使用 Service Catalog。委托人可以创建、获取、更新或终止预配置产品，例如使用 AWS 资源部署的服务器、数据库、网站或应用程序。这是 SageMaker AI JumpStart 和 Projects 查找和阅读服务目录产品以及在用户中启动 AWS 资源所必需的。
+ `sns` - 允许主体获取 Amazon SNS 主题列表。启用了同步推理功能的端点需要该权限来通知用户推理已完成。
+ `states`— SageMaker AI JumpStart 和 Pipelines 需要使用服务目录来创建步骤函数资源。
+ `tag`— SageMaker 人工智能管道需要在 Studio Classic 中进行渲染。Studio Classic 需要使用特定 `sagemaker:project-id` 标记键标记的资源。这需要 `tag:GetResources` 权限。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "AllowAllNonAdminSageMakerActions",
      "Effect": "Allow",
      "Action": [
        "sagemaker:*",
        "sagemaker-geospatial:*"
      ],
      "NotResource": [
        "arn:aws:sagemaker:*:*:domain/*",
        "arn:aws:sagemaker:*:*:user-profile/*",
        "arn:aws:sagemaker:*:*:app/*",
        "arn:aws:sagemaker:*:*:space/*",
        "arn:aws:sagemaker:*:*:partner-app/*",
        "arn:aws:sagemaker:*:*:flow-definition/*",
        "arn:aws:sagemaker:*:*:training-plan/*",
        "arn:aws:sagemaker:*:*:reserved-capacity/*"
      ]
    },
    {
      "Sid": "AllowAddTagsForSpace",
      "Effect": "Allow",
      "Action": [
        "sagemaker:AddTags"
      ],
      "Resource": [
        "arn:aws:sagemaker:*:*:space/*"
      ],
      "Condition": {
        "StringEquals": {
          "sagemaker:TaggingAction": "CreateSpace"
        }
      }
    },
    {
      "Sid": "AllowAddTagsForApp",
      "Effect": "Allow",
      "Action": [
        "sagemaker:AddTags"
      ],
      "Resource": [
        "arn:aws:sagemaker:*:*:app/*"
      ]
    },
    {
      "Sid": "AllowUseOfTrainingPlanResources",
      "Effect": "Allow",
      "Action": [
        "sagemaker:CreateTrainingJob",
        "sagemaker:CreateCluster",
        "sagemaker:UpdateCluster",
        "sagemaker:DescribeTrainingPlan"
      ],
      "Resource": [
        "arn:aws:sagemaker:*:*:training-plan/*",
        "arn:aws:sagemaker:*:*:reserved-capacity/*"
      ]
    },
    {
      "Sid": "AllowStudioActions",
      "Effect": "Allow",
      "Action": [
        "sagemaker:CreatePresignedDomainUrl",
        "sagemaker:DescribeDomain",
        "sagemaker:ListDomains",
        "sagemaker:DescribeUserProfile",
        "sagemaker:ListUserProfiles",
        "sagemaker:DescribeSpace",
        "sagemaker:ListSpaces",
        "sagemaker:DescribeApp",
        "sagemaker:ListApps"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AllowAppActionsForUserProfile",
      "Effect": "Allow",
      "Action": [
        "sagemaker:CreateApp",
        "sagemaker:DeleteApp"
      ],
      "Resource": "arn:aws:sagemaker:*:*:app/*/*/*/*",
      "Condition": {
        "Null": {
          "sagemaker:OwnerUserProfileArn": "true"
        }
      }
    },
    {
      "Sid": "AllowAppActionsForSharedSpaces",
      "Effect": "Allow",
      "Action": [
        "sagemaker:CreateApp",
        "sagemaker:DeleteApp"
      ],
      "Resource": "arn:aws:sagemaker:*:*:app/${sagemaker:DomainId}/*/*/*",
      "Condition": {
        "StringEquals": {
          "sagemaker:SpaceSharingType": [
            "Shared"
          ]
        }
      }
    },
    {
      "Sid": "AllowMutatingActionsOnSharedSpacesWithoutOwner",
      "Effect": "Allow",
      "Action": [
        "sagemaker:CreateSpace",
        "sagemaker:UpdateSpace",
        "sagemaker:DeleteSpace"
      ],
      "Resource": "arn:aws:sagemaker:*:*:space/${sagemaker:DomainId}/*",
      "Condition": {
        "Null": {
          "sagemaker:OwnerUserProfileArn": "true"
        }
      }
    },
    {
      "Sid": "RestrictMutatingActionsOnSpacesToOwnerUserProfile",
      "Effect": "Allow",
      "Action": [
        "sagemaker:CreateSpace",
        "sagemaker:UpdateSpace",
        "sagemaker:DeleteSpace"
      ],
      "Resource": "arn:aws:sagemaker:*:*:space/${sagemaker:DomainId}/*",
      "Condition": {
        "ArnLike": {
          "sagemaker:OwnerUserProfileArn": "arn:aws:sagemaker:*:*:user-profile/${sagemaker:DomainId}/${sagemaker:UserProfileName}"
        },
        "StringEquals": {
          "sagemaker:SpaceSharingType": [
            "Private",
            "Shared"
          ]
        }
      }
    },
    {
      "Sid": "RestrictMutatingActionsOnPrivateSpaceAppsToOwnerUserProfile",
      "Effect": "Allow",
      "Action": [
        "sagemaker:CreateApp",
        "sagemaker:DeleteApp"
      ],
      "Resource": "arn:aws:sagemaker:*:*:app/${sagemaker:DomainId}/*/*/*",
      "Condition": {
        "ArnLike": {
          "sagemaker:OwnerUserProfileArn": "arn:aws:sagemaker:*:*:user-profile/${sagemaker:DomainId}/${sagemaker:UserProfileName}"
        },
        "StringEquals": {
          "sagemaker:SpaceSharingType": [
            "Private"
          ]
        }
      }
    },
    {
      "Sid": "AllowFlowDefinitionActions",
      "Effect": "Allow",
      "Action": "sagemaker:*",
      "Resource": [
        "arn:aws:sagemaker:*:*:flow-definition/*"
      ],
      "Condition": {
        "StringEqualsIfExists": {
          "sagemaker:WorkteamType": [
            "private-crowd",
            "vendor-crowd"
          ]
        }
      }
    },
    {
      "Sid": "AllowAWSServiceActions",
      "Effect": "Allow",
      "Action": [
        "application-autoscaling:DeleteScalingPolicy",
        "application-autoscaling:DeleteScheduledAction",
        "application-autoscaling:DeregisterScalableTarget",
        "application-autoscaling:DescribeScalableTargets",
        "application-autoscaling:DescribeScalingActivities",
        "application-autoscaling:DescribeScalingPolicies",
        "application-autoscaling:DescribeScheduledActions",
        "application-autoscaling:PutScalingPolicy",
        "application-autoscaling:PutScheduledAction",
        "application-autoscaling:RegisterScalableTarget",
        "aws-marketplace:ViewSubscriptions",
        "cloudformation:GetTemplateSummary",
        "cloudwatch:DeleteAlarms",
        "cloudwatch:DescribeAlarms",
        "cloudwatch:GetMetricData",
        "cloudwatch:GetMetricStatistics",
        "cloudwatch:ListMetrics",
        "cloudwatch:PutMetricAlarm",
        "cloudwatch:PutMetricData",
        "codecommit:BatchGetRepositories",
        "codecommit:CreateRepository",
        "codecommit:GetRepository",
        "codecommit:List*",
        "cognito-idp:AdminAddUserToGroup",
        "cognito-idp:AdminCreateUser",
        "cognito-idp:AdminDeleteUser",
        "cognito-idp:AdminDisableUser",
        "cognito-idp:AdminEnableUser",
        "cognito-idp:AdminRemoveUserFromGroup",
        "cognito-idp:CreateGroup",
        "cognito-idp:CreateUserPool",
        "cognito-idp:CreateUserPoolClient",
        "cognito-idp:CreateUserPoolDomain",
        "cognito-idp:DescribeUserPool",
        "cognito-idp:DescribeUserPoolClient",
        "cognito-idp:List*",
        "cognito-idp:UpdateUserPool",
        "cognito-idp:UpdateUserPoolClient",
        "ec2:CreateNetworkInterface",
        "ec2:CreateNetworkInterfacePermission",
        "ec2:CreateVpcEndpoint",
        "ec2:DeleteNetworkInterface",
        "ec2:DeleteNetworkInterfacePermission",
        "ec2:DescribeDhcpOptions",
        "ec2:DescribeNetworkInterfaces",
        "ec2:DescribeRouteTables",
        "ec2:DescribeSecurityGroups",
        "ec2:DescribeSubnets",
        "ec2:DescribeVpcEndpoints",
        "ec2:DescribeVpcs",
        "ecr:BatchCheckLayerAvailability",
        "ecr:BatchGetImage",
        "ecr:CreateRepository",
        "ecr:Describe*",
        "ecr:GetAuthorizationToken",
        "ecr:GetDownloadUrlForLayer",
        "ecr:StartImageScan",
        "elasticfilesystem:DescribeFileSystems",
        "elasticfilesystem:DescribeMountTargets",
        "fsx:DescribeFileSystems",
        "glue:CreateJob",
        "glue:DeleteJob",
        "glue:GetJob*",
        "glue:GetTable*",
        "glue:GetWorkflowRun",
        "glue:ResetJobBookmark",
        "glue:StartJobRun",
        "glue:StartWorkflowRun",
        "glue:UpdateJob",
        "groundtruthlabeling:*",
        "iam:ListRoles",
        "kms:DescribeKey",
        "kms:ListAliases",
        "lambda:ListFunctions",
        "logs:CreateLogDelivery",
        "logs:CreateLogGroup",
        "logs:CreateLogStream",
        "logs:DeleteLogDelivery",
        "logs:Describe*",
        "logs:GetLogDelivery",
        "logs:GetLogEvents",
        "logs:ListLogDeliveries",
        "logs:PutLogEvents",
        "logs:PutResourcePolicy",
        "logs:UpdateLogDelivery",
        "robomaker:CreateSimulationApplication",
        "robomaker:DescribeSimulationApplication",
        "robomaker:DeleteSimulationApplication",
        "robomaker:CreateSimulationJob",
        "robomaker:DescribeSimulationJob",
        "robomaker:CancelSimulationJob",
        "secretsmanager:ListSecrets",
        "servicecatalog:Describe*",
        "servicecatalog:List*",
        "servicecatalog:ScanProvisionedProducts",
        "servicecatalog:SearchProducts",
        "servicecatalog:SearchProvisionedProducts",
        "sns:ListTopics",
        "tag:GetResources"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AllowECRActions",
      "Effect": "Allow",
      "Action": [
        "ecr:SetRepositoryPolicy",
        "ecr:CompleteLayerUpload",
        "ecr:BatchDeleteImage",
        "ecr:UploadLayerPart",
        "ecr:DeleteRepositoryPolicy",
        "ecr:InitiateLayerUpload",
        "ecr:DeleteRepository",
        "ecr:PutImage"
      ],
      "Resource": [
        "arn:aws:ecr:*:*:repository/*sagemaker*"
      ]
    },
    {
      "Sid": "AllowCodeCommitActions",
      "Effect": "Allow",
      "Action": [
        "codecommit:GitPull",
        "codecommit:GitPush"
      ],
      "Resource": [
        "arn:aws:codecommit:*:*:*sagemaker*",
        "arn:aws:codecommit:*:*:*SageMaker*",
        "arn:aws:codecommit:*:*:*Sagemaker*"
      ]
    },
    {
      "Sid": "AllowCodeBuildActions",
      "Action": [
        "codebuild:BatchGetBuilds",
        "codebuild:StartBuild"
      ],
      "Resource": [
        "arn:aws:codebuild:*:*:project/sagemaker*",
        "arn:aws:codebuild:*:*:build/*"
      ],
      "Effect": "Allow"
    },
    {
      "Sid": "AllowStepFunctionsActions",
      "Action": [
        "states:DescribeExecution",
        "states:GetExecutionHistory",
        "states:StartExecution",
        "states:StopExecution",
        "states:UpdateStateMachine"
      ],
      "Resource": [
        "arn:aws:states:*:*:statemachine:*sagemaker*",
        "arn:aws:states:*:*:execution:*sagemaker*:*"
      ],
      "Effect": "Allow"
    },
    {
      "Sid": "AllowSecretManagerActions",
      "Effect": "Allow",
      "Action": [
        "secretsmanager:DescribeSecret",
        "secretsmanager:GetSecretValue",
        "secretsmanager:CreateSecret"
      ],
      "Resource": [
        "arn:aws:secretsmanager:*:*:secret:AmazonSageMaker-*"
      ]
    },
    {
      "Sid": "AllowReadOnlySecretManagerActions",
      "Effect": "Allow",
      "Action": [
        "secretsmanager:DescribeSecret",
        "secretsmanager:GetSecretValue"
      ],
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "secretsmanager:ResourceTag/SageMaker": "true"
        }
      }
    },
    {
      "Sid": "AllowServiceCatalogProvisionProduct",
      "Effect": "Allow",
      "Action": [
        "servicecatalog:ProvisionProduct"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AllowServiceCatalogTerminateUpdateProvisionProduct",
      "Effect": "Allow",
      "Action": [
        "servicecatalog:TerminateProvisionedProduct",
        "servicecatalog:UpdateProvisionedProduct"
      ],
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "servicecatalog:userLevel": "self"
        }
      }
    },
    {
      "Sid": "AllowS3ObjectActions",
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject",
        "s3:DeleteObject",
        "s3:AbortMultipartUpload"
      ],
      "Resource": [
        "arn:aws:s3:::*SageMaker*",
        "arn:aws:s3:::*Sagemaker*",
        "arn:aws:s3:::*sagemaker*",
        "arn:aws:s3:::*aws-glue*"
      ]
    },
    {
      "Sid": "AllowS3GetObjectWithSageMakerExistingObjectTag",
      "Effect": "Allow",
      "Action": [
        "s3:GetObject"
      ],
      "Resource": [
        "arn:aws:s3:::*"
      ],
      "Condition": {
        "StringEqualsIgnoreCase": {
          "s3:ExistingObjectTag/SageMaker": "true"
        }
      }
    },
    {
      "Sid": "AllowS3GetObjectWithServiceCatalogProvisioningExistingObjectTag",
      "Effect": "Allow",
      "Action": [
        "s3:GetObject"
      ],
      "Resource": [
        "arn:aws:s3:::*"
      ],
      "Condition": {
        "StringEquals": {
          "s3:ExistingObjectTag/servicecatalog:provisioning": "true"
        }
      }
    },
    {
      "Sid": "AllowS3BucketActions",
      "Effect": "Allow",
      "Action": [
        "s3:CreateBucket",
        "s3:GetBucketLocation",
        "s3:ListBucket",
        "s3:ListAllMyBuckets",
        "s3:GetBucketCors",
        "s3:PutBucketCors"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AllowS3BucketACL",
      "Effect": "Allow",
      "Action": [
        "s3:GetBucketAcl",
        "s3:PutObjectAcl"
      ],
      "Resource": [
        "arn:aws:s3:::*SageMaker*",
        "arn:aws:s3:::*Sagemaker*",
        "arn:aws:s3:::*sagemaker*"
      ]
    },
    {
      "Sid": "AllowLambdaInvokeFunction",
      "Effect": "Allow",
      "Action": [
        "lambda:InvokeFunction"
      ],
      "Resource": [
        "arn:aws:lambda:*:*:function:*SageMaker*",
        "arn:aws:lambda:*:*:function:*sagemaker*",
        "arn:aws:lambda:*:*:function:*Sagemaker*",
        "arn:aws:lambda:*:*:function:*LabelingFunction*"
      ]
    },
    {
      "Sid": "AllowCreateServiceLinkedRoleForSageMakerApplicationAutoscaling",
      "Action": "iam:CreateServiceLinkedRole",
      "Effect": "Allow",
      "Resource": "arn:aws:iam::*:role/aws-service-role/sagemaker.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_SageMakerEndpoint",
      "Condition": {
        "StringLike": {
          "iam:AWSServiceName": "sagemaker.application-autoscaling.amazonaws.com"
        }
      }
    },
    {
      "Sid": "AllowCreateServiceLinkedRoleForRobomaker",
      "Effect": "Allow",
      "Action": "iam:CreateServiceLinkedRole",
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "iam:AWSServiceName": "robomaker.amazonaws.com"
        }
      }
    },
    {
      "Sid": "AllowSNSActions",
      "Effect": "Allow",
      "Action": [
        "sns:Subscribe",
        "sns:CreateTopic",
        "sns:Publish"
      ],
      "Resource": [
        "arn:aws:sns:*:*:*SageMaker*",
        "arn:aws:sns:*:*:*Sagemaker*",
        "arn:aws:sns:*:*:*sagemaker*"
      ]
    },
    {
      "Sid": "AllowPassRoleForSageMakerRoles",
      "Effect": "Allow",
      "Action": [
        "iam:PassRole"
      ],
      "Resource": "arn:aws:iam::*:role/*AmazonSageMaker*",
      "Condition": {
        "StringEquals": {
          "iam:PassedToService": [
            "glue.amazonaws.com",
            "robomaker.amazonaws.com",
            "states.amazonaws.com"
          ]
        }
      }
    },
    {
      "Sid": "AllowPassRoleToSageMaker",
      "Effect": "Allow",
      "Action": [
        "iam:PassRole"
      ],
      "Resource": "arn:aws:iam::*:role/*",
      "Condition": {
        "StringEquals": {
          "iam:PassedToService": "sagemaker.amazonaws.com"
        }
      }
    },
    {
      "Sid": "AllowAthenaActions",
      "Effect": "Allow",
      "Action": [
        "athena:ListDataCatalogs",
        "athena:ListDatabases",
        "athena:ListTableMetadata",
        "athena:GetQueryExecution",
        "athena:GetQueryResults",
        "athena:StartQueryExecution",
        "athena:StopQueryExecution"
      ],
      "Resource": [
        "*"
      ]
    },
    {
      "Sid": "AllowGlueCreateTable",
      "Effect": "Allow",
      "Action": [
        "glue:CreateTable"
      ],
      "Resource": [
        "arn:aws:glue:*:*:table/*/sagemaker_tmp_*",
        "arn:aws:glue:*:*:table/sagemaker_featurestore/*",
        "arn:aws:glue:*:*:catalog",
        "arn:aws:glue:*:*:database/*"
      ]
    },
    {
      "Sid": "AllowGlueUpdateTable",
      "Effect": "Allow",
      "Action": [
        "glue:UpdateTable"
      ],
      "Resource": [
        "arn:aws:glue:*:*:table/sagemaker_featurestore/*",
        "arn:aws:glue:*:*:catalog",
        "arn:aws:glue:*:*:database/sagemaker_featurestore"
      ]
    },
    {
      "Sid": "AllowGlueDeleteTable",
      "Effect": "Allow",
      "Action": [
        "glue:DeleteTable"
      ],
      "Resource": [
        "arn:aws:glue:*:*:table/*/sagemaker_tmp_*",
        "arn:aws:glue:*:*:catalog",
        "arn:aws:glue:*:*:database/*"
      ]
    },
    {
      "Sid": "AllowGlueGetTablesAndDatabases",
      "Effect": "Allow",
      "Action": [
        "glue:GetDatabases",
        "glue:GetTable",
        "glue:GetTables"
      ],
      "Resource": [
        "arn:aws:glue:*:*:table/*",
        "arn:aws:glue:*:*:catalog",
        "arn:aws:glue:*:*:database/*"
      ]
    },
    {
      "Sid": "AllowGlueGetAndCreateDatabase",
      "Effect": "Allow",
      "Action": [
        "glue:CreateDatabase",
        "glue:GetDatabase"
      ],
      "Resource": [
        "arn:aws:glue:*:*:catalog",
        "arn:aws:glue:*:*:database/sagemaker_featurestore",
        "arn:aws:glue:*:*:database/sagemaker_processing",
        "arn:aws:glue:*:*:database/default",
        "arn:aws:glue:*:*:database/sagemaker_data_wrangler"
      ]
    },
    {
      "Sid": "AllowRedshiftDataActions",
      "Effect": "Allow",
      "Action": [
        "redshift-data:ExecuteStatement",
        "redshift-data:DescribeStatement",
        "redshift-data:CancelStatement",
        "redshift-data:GetStatementResult",
        "redshift-data:ListSchemas",
        "redshift-data:ListTables"
      ],
      "Resource": [
        "*"
      ]
    },
    {
      "Sid": "AllowRedshiftGetClusterCredentials",
      "Effect": "Allow",
      "Action": [
        "redshift:GetClusterCredentials"
      ],
      "Resource": [
        "arn:aws:redshift:*:*:dbuser:*/sagemaker_access*",
        "arn:aws:redshift:*:*:dbname:*"
      ]
    },
    {
      "Sid": "AllowListTagsForUserProfile",
      "Effect": "Allow",
      "Action": [
        "sagemaker:ListTags"
      ],
      "Resource": [
        "arn:aws:sagemaker:*:*:user-profile/*"
      ]
    },
    {
      "Sid": "AllowCloudformationListStackResources",
      "Effect": "Allow",
      "Action": [
        "cloudformation:ListStackResources"
      ],
      "Resource": "arn:aws:cloudformation:*:*:stack/SC-*"
    },
    {
      "Sid": "AllowS3ExpressObjectActions",
      "Effect": "Allow",
      "Action": [
        "s3express:CreateSession"
      ],
      "Resource": [
        "arn:aws:s3express:*:*:bucket/*SageMaker*",
        "arn:aws:s3express:*:*:bucket/*Sagemaker*",
        "arn:aws:s3express:*:*:bucket/*sagemaker*",
        "arn:aws:s3express:*:*:bucket/*aws-glue*"
      ],
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "AllowS3ExpressCreateBucketActions",
      "Effect": "Allow",
      "Action": [
        "s3express:CreateBucket"
      ],
      "Resource": [
        "arn:aws:s3express:*:*:bucket/*SageMaker*",
        "arn:aws:s3express:*:*:bucket/*Sagemaker*",
        "arn:aws:s3express:*:*:bucket/*sagemaker*"
      ],
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "AllowS3ExpressListBucketActions",
      "Effect": "Allow",
      "Action": [
        "s3express:ListAllMyDirectoryBuckets"
      ],
      "Resource": "*"
    }
  ]
}
```

------

## AWS 托管策略： AmazonSageMakerReadOnly
<a name="security-iam-awsmanpol-AmazonSageMakerReadOnly"></a>

此政策授予通过 AWS 管理控制台 和软件开发工具包对 Amazon SageMaker AI 的只读访问权限。

**权限详细信息**

该策略包含以下权限。
+ `application-autoscaling`— 允许用户浏览可扩展的 SageMaker AI 实时推理端点的描述。
+ `aws-marketplace`— 允许用户查看 AWS AI Marketplace 订阅。
+ `cloudwatch`— 允许用户接收 CloudWatch 警报。
+ `cognito-idp`— Amazon Gro SageMaker und Truth 需要浏览私人员工和工作团队的描述和列表。
+ `ecr` - 读取 Docker 构件以进行训练和推理时所需。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "sagemaker:Describe*",
                "sagemaker:List*",
                "sagemaker:BatchGetMetrics",
                "sagemaker:GetDeviceRegistration",
                "sagemaker:GetDeviceFleetReport",
                "sagemaker:GetSearchSuggestions",
                "sagemaker:BatchGetRecord",
                "sagemaker:GetRecord",
                "sagemaker:Search",
                "sagemaker:QueryLineage",
                "sagemaker:GetLineageGroupPolicy",
                "sagemaker:BatchDescribeModelPackage",
                "sagemaker:GetModelPackageGroupPolicy"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "application-autoscaling:DescribeScalableTargets",
                "application-autoscaling:DescribeScalingActivities",
                "application-autoscaling:DescribeScalingPolicies",
                "application-autoscaling:DescribeScheduledActions",
                "aws-marketplace:ViewSubscriptions",
                "cloudwatch:DescribeAlarms",
                "cognito-idp:DescribeUserPool",
                "cognito-idp:DescribeUserPoolClient",
                "cognito-idp:ListGroups",
                "cognito-idp:ListIdentityProviders",
                "cognito-idp:ListUserPoolClients",
                "cognito-idp:ListUserPools",
                "cognito-idp:ListUsers",
                "cognito-idp:ListUsersInGroup",
                "ecr:Describe*"
            ],
            "Resource": "*"
        }
    ]
}
```

------

# AWS 亚马逊 C SageMaker anvas 的托管政策
<a name="security-iam-awsmanpol-canvas"></a>

这些 AWS 托管策略增加了使用 Amazon SageMaker Canvas 所需的权限。这些策略可在您的 AWS 账户中使用，并由从 SageMaker AI 控制台创建的执行角色使用。

**Topics**
+ [AWS 托管策略： AmazonSageMakerCanvasFullAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasFullAccess)
+ [AWS 托管策略： AmazonSageMakerCanvasDataPrepFullAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasDataPrepFullAccess)
+ [AWS 托管策略： AmazonSageMakerCanvasDirectDeployAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasDirectDeployAccess)
+ [AWS 托管策略： AmazonSageMakerCanvasAIServices访问权限](#security-iam-awsmanpol-AmazonSageMakerCanvasAIServicesAccess)
+ [AWS 托管策略： AmazonSageMakerCanvasBedrockAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasBedrockAccess)
+ [AWS 托管策略： AmazonSageMakerCanvasForecastAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasForecastAccess)
+ [AWS 托管策略： AmazonSageMakerCanvasEMRServerlessExecutionRolePolicy](#security-iam-awsmanpol-AmazonSageMakerCanvasEMRServerlessExecutionRolePolicy)
+ [AWS 托管策略： AmazonSageMakerCanvasSMDataScienceAssistantAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasSMDataScienceAssistantAccess)
+ [亚马逊 SageMaker AI 更新了亚马逊 SageMaker Canvas 托管政策](#security-iam-awsmanpol-canvas-updates)

## AWS 托管策略： AmazonSageMakerCanvasFullAccess
<a name="security-iam-awsmanpol-AmazonSageMakerCanvasFullAccess"></a>

此政策授予的权限允许通过 AWS 管理控制台 和软件开发工具包对 Amazon SageMaker Canvas 进行完全访问。该政策还提供对相关服务的精选访问权限 [例如，亚马逊简单存储服务 (Amazon S3)、(IAM)、亚马逊虚拟私有云 (亚马逊 VPC) AWS Identity and Access Management 、亚马逊弹性容器注册表 (Amazon ECR) Container Registry、亚马逊日志、亚马逊 Redshift、 CloudWatch Amazon Autop SageMaker ilo AWS Secrets Manager t SageMaker 、模型注册表和亚马逊预测]。

本政策旨在帮助客户尝试并开始使用 SageMaker Canvas 的所有功能。为了实现更精细的控制，我们建议客户在转向生产工作负载时构建自己的范围缩小版本。有关更多信息，请参阅 [IAM 策略类型：如何以及何时使用它们](https://aws.amazon.com/blogs/security/iam-policy-types-how-and-when-to-use-them/)。

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `sagemaker`— 允许委托人在 ARN 包含 “画布”、“画布” 或 “模型编译-” 的资源上创建和托管 A SageMaker I 模型。此外，用户可以在同一个 AWS 账户中将他们的 SageMaker Canvas 模型注册到 SageMaker AI 模型注册中心。还允许校长创建和管理 SageMaker 训练、转换和 AutoML 作业。
+ `application-autoscaling`— 允许委托人自动扩展 A SageMaker I 推理端点。
+ `athena`：允许主体从 Amazon Athena 查询数据目录、数据库和表元数据列表，并访问目录中的表。
+ `cloudwatch`— 允许委托人创建和管理 Amazon CloudWatch 警报。
+ `ec2` - 允许主体创建 Amazon VPC 端点。
+ `ecr` - 允许主体获取有关容器映像的信息。
+ `emr-serverless`：允许主体创建和管理 Amazon EMR Serverless 应用程序和作业运行。还允许委托人标记 SageMaker Canvas 资源。
+ `forecast` - 允许主体使用 Amazon Forecast。
+ `glue`— 允许委托人检索 AWS Glue 目录中的表、数据库和分区。
+ `iam`— 允许委托人将 IAM 角色传递给 Amazon A SageMaker I、Amazon Forecast 和 Amazon EMR Serverless。还允许主体创建与服务相关联的角色。
+ `kms`— 允许委托人读取标有标签的 AWS KMS `Source:SageMakerCanvas`密钥。
+ `logs` - 允许主体发布来自训练作业和端点的日志。
+ `quicksight`— 允许委托人列出 Quick 账户中的命名空间。
+ `rds` - 允许主体返回有关预置 Amazon RDS 实例的信息。
+ `redshift` - 允许主体获取任何 Amazon Redshift 集群上的“sagemaker\$1access\$1”dbuser 的凭证（如果该用户存在）。
+ `redshift-data` - 允许主体使用 Amazon Redshift Data API 在 Amazon Redshift 上运行查询。这仅提供对 Redshift 数据 APIs 本身的访问权限，并不直接提供对您的 Amazon Redshift 集群的访问权限。有关更多信息，请参阅[使用 Amazon Redshift Data API](https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html)。
+ `s3` - 允许主体从 Amazon S3 存储桶中添加和检索对象。这些对象仅限于名称包含 “”、SageMaker “Sagemaker” 或 “sagemaker” 的对象。还允许委托人从特定区域的 ARN 以 “jumpstart-cache-prod-” 开头的 Amazon S3 存储桶中检索对象。
+ `secretsmanager` - 允许主体存储客户凭证，以便使用 Secrets Manager 连接到 Snowflake 数据库。

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "SageMakerUserDetailsAndPackageOperations",
            "Effect": "Allow",
            "Action": [
                "sagemaker:DescribeDomain",
                "sagemaker:DescribeUserProfile",
                "sagemaker:ListTags",
                "sagemaker:ListModelPackages",
                "sagemaker:ListModelPackageGroups",
                "sagemaker:ListEndpoints"
            ],
            "Resource": "*"
        },
        {
            "Sid": "SageMakerPackageGroupOperations",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateModelPackageGroup",
                "sagemaker:CreateModelPackage",
                "sagemaker:DescribeModelPackageGroup",
                "sagemaker:DescribeModelPackage"
            ],
            "Resource": [
                "arn:aws:sagemaker:*:*:model-package/*",
                "arn:aws:sagemaker:*:*:model-package-group/*"
            ]
        },
        {
            "Sid": "SageMakerTrainingOperations",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateCompilationJob",
                "sagemaker:CreateEndpoint",
                "sagemaker:CreateEndpointConfig",
                "sagemaker:CreateModel",
                "sagemaker:CreateProcessingJob",
                "sagemaker:CreateAutoMLJob",
                "sagemaker:CreateAutoMLJobV2",
                "sagemaker:CreateTrainingJob",
                "sagemaker:CreateTransformJob",
                "sagemaker:DeleteEndpoint",
                "sagemaker:DescribeCompilationJob",
                "sagemaker:DescribeEndpoint",
                "sagemaker:DescribeEndpointConfig",
                "sagemaker:DescribeModel",
                "sagemaker:DescribeProcessingJob",
                "sagemaker:DescribeAutoMLJob",
                "sagemaker:DescribeAutoMLJobV2",
                "sagemaker:DescribeTrainingJob",
                "sagemaker:DescribeTransformJob",
                "sagemaker:ListCandidatesForAutoMLJob",
                "sagemaker:StopAutoMLJob",
                "sagemaker:StopTrainingJob",
                "sagemaker:StopTransformJob",
                "sagemaker:AddTags",
                "sagemaker:DeleteApp"
            ],
            "Resource": [
                "arn:aws:sagemaker:*:*:*Canvas*",
                "arn:aws:sagemaker:*:*:*canvas*",
                "arn:aws:sagemaker:*:*:*model-compilation-*"
            ]
        },
        {
            "Sid": "SageMakerHostingOperations",
            "Effect": "Allow",
            "Action": [
                "sagemaker:DeleteEndpointConfig",
                "sagemaker:DeleteModel",
                "sagemaker:InvokeEndpoint",
                "sagemaker:UpdateEndpointWeightsAndCapacities",
                "sagemaker:InvokeEndpointAsync"
            ],
            "Resource": [
                "arn:aws:sagemaker:*:*:*Canvas*",
                "arn:aws:sagemaker:*:*:*canvas*"
            ]
        },
        {
            "Sid": "EC2VPCOperation",
            "Effect": "Allow",
            "Action": [
                "ec2:CreateVpcEndpoint",
                "ec2:DescribeSecurityGroups",
                "ec2:DescribeSubnets",
                "ec2:DescribeVpcs",
                "ec2:DescribeVpcEndpoints",
                "ec2:DescribeVpcEndpointServices"
            ],
            "Resource": "*"
        },
        {
            "Sid": "ECROperations",
            "Effect": "Allow",
            "Action": [
                "ecr:BatchGetImage",
                "ecr:GetDownloadUrlForLayer",
                "ecr:GetAuthorizationToken"
            ],
            "Resource": "*"
        },
        {
            "Sid": "IAMGetOperations",
            "Effect": "Allow",
            "Action": [
                "iam:GetRole"
            ],
            "Resource": "arn:aws:iam::*:role/*"
        },
        {
            "Sid": "IAMPassOperation",
            "Effect": "Allow",
            "Action": [
                "iam:PassRole"
            ],
            "Resource": "arn:aws:iam::*:role/*",
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": "sagemaker.amazonaws.com"
                }
            }
        },
        {
            "Sid": "LoggingOperation",
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": "arn:aws:logs:*:*:log-group:/aws/sagemaker/*"
        },
        {
            "Sid": "S3Operations",
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject",
                "s3:CreateBucket",
                "s3:GetBucketCors",
                "s3:GetBucketLocation"
            ],
            "Resource": [
                "arn:aws:s3:::*SageMaker*",
                "arn:aws:s3:::*Sagemaker*",
                "arn:aws:s3:::*sagemaker*"
            ]
        },
        {
            "Sid": "ReadSageMakerJumpstartArtifacts",
            "Effect": "Allow",
            "Action": "s3:GetObject",
            "Resource": [
                "arn:aws:s3:::jumpstart-cache-prod-us-west-2/*",
                "arn:aws:s3:::jumpstart-cache-prod-us-east-1/*",
                "arn:aws:s3:::jumpstart-cache-prod-us-east-2/*",
                "arn:aws:s3:::jumpstart-cache-prod-eu-west-1/*",
                "arn:aws:s3:::jumpstart-cache-prod-eu-central-1/*",
                "arn:aws:s3:::jumpstart-cache-prod-ap-south-1/*",
                "arn:aws:s3:::jumpstart-cache-prod-ap-northeast-2/*",
                "arn:aws:s3:::jumpstart-cache-prod-ap-northeast-1/*",
                "arn:aws:s3:::jumpstart-cache-prod-ap-southeast-1/*",
                "arn:aws:s3:::jumpstart-cache-prod-ap-southeast-2/*"
            ]
        },
        {
            "Sid": "S3ListOperations",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:ListAllMyBuckets"
            ],
            "Resource": "*"
        },
        {
            "Sid": "GlueOperations",
            "Effect": "Allow",
            "Action": "glue:SearchTables",
            "Resource": [
                "arn:aws:glue:*:*:table/*/*",
                "arn:aws:glue:*:*:database/*",
                "arn:aws:glue:*:*:catalog"
            ]
        },
        {
            "Sid": "SecretsManagerARNBasedOperation",
            "Effect": "Allow",
            "Action": [
                "secretsmanager:DescribeSecret",
                "secretsmanager:GetSecretValue",
                "secretsmanager:CreateSecret",
                "secretsmanager:PutResourcePolicy"
            ],
            "Resource": [
                "arn:aws:secretsmanager:*:*:secret:AmazonSageMaker-*"
            ]
        },
        {
            "Sid": "SecretManagerTagBasedOperation",
            "Effect": "Allow",
            "Action": [
                "secretsmanager:DescribeSecret",
                "secretsmanager:GetSecretValue"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "secretsmanager:ResourceTag/SageMaker": "true"
                }
            }
        },
        {
            "Sid": "RedshiftOperations",
            "Effect": "Allow",
            "Action": [
                "redshift-data:ExecuteStatement",
                "redshift-data:DescribeStatement",
                "redshift-data:CancelStatement",
                "redshift-data:GetStatementResult",
                "redshift-data:ListSchemas",
                "redshift-data:ListTables",
                "redshift-data:DescribeTable"
            ],
            "Resource": "*"
        },
        {
            "Sid": "RedshiftGetCredentialsOperation",
            "Effect": "Allow",
            "Action": [
                "redshift:GetClusterCredentials"
            ],
            "Resource": [
                "arn:aws:redshift:*:*:dbuser:*/sagemaker_access*",
                "arn:aws:redshift:*:*:dbname:*"
            ]
        },
        {
            "Sid": "ForecastOperations",
            "Effect": "Allow",
            "Action": [
                "forecast:CreateExplainabilityExport",
                "forecast:CreateExplainability",
                "forecast:CreateForecastEndpoint",
                "forecast:CreateAutoPredictor",
                "forecast:CreateDatasetImportJob",
                "forecast:CreateDatasetGroup",
                "forecast:CreateDataset",
                "forecast:CreateForecast",
                "forecast:CreateForecastExportJob",
                "forecast:CreatePredictorBacktestExportJob",
                "forecast:CreatePredictor",
                "forecast:DescribeExplainabilityExport",
                "forecast:DescribeExplainability",
                "forecast:DescribeAutoPredictor",
                "forecast:DescribeForecastEndpoint",
                "forecast:DescribeDatasetImportJob",
                "forecast:DescribeDataset",
                "forecast:DescribeForecast",
                "forecast:DescribeForecastExportJob",
                "forecast:DescribePredictorBacktestExportJob",
                "forecast:GetAccuracyMetrics",
                "forecast:InvokeForecastEndpoint",
                "forecast:GetRecentForecastContext",
                "forecast:DescribePredictor",
                "forecast:TagResource",
                "forecast:DeleteResourceTree"
            ],
            "Resource": [
                "arn:aws:forecast:*:*:*Canvas*"
            ]
        },
        {
            "Sid": "RDSOperation",
            "Effect": "Allow",
            "Action": "rds:DescribeDBInstances",
            "Resource": "*"
        },
        {
            "Sid": "IAMPassOperationForForecast",
            "Effect": "Allow",
            "Action": [
                "iam:PassRole"
            ],
            "Resource": "arn:aws:iam::*:role/*",
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": "forecast.amazonaws.com"
                }
            }
        },
        {
            "Sid": "AutoscalingOperations",
            "Effect": "Allow",
            "Action": [
                "application-autoscaling:PutScalingPolicy",
                "application-autoscaling:RegisterScalableTarget"
            ],
            "Resource": "arn:aws:application-autoscaling:*:*:scalable-target/*",
            "Condition": {
                "StringEquals": {
                    "application-autoscaling:service-namespace": "sagemaker",
                    "application-autoscaling:scalable-dimension": "sagemaker:variant:DesiredInstanceCount"
                }
            }
        },
        {
            "Sid": "AsyncEndpointOperations",
            "Effect": "Allow",
            "Action": [
                "cloudwatch:DescribeAlarms",
                "sagemaker:DescribeEndpointConfig"
            ],
            "Resource": "*"
        },
        {
            "Sid": "DescribeScalingOperations",
            "Effect": "Allow",
            "Action": [
                "application-autoscaling:DescribeScalingActivities"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "SageMakerCloudWatchUpdate",
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricAlarm",
                "cloudwatch:DeleteAlarms"
            ],
            "Resource": [
                "arn:aws:cloudwatch:*:*:alarm:TargetTracking*"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:CalledViaLast": "application-autoscaling.amazonaws.com"
                }
            }
        },
        {
            "Sid": "AutoscalingSageMakerEndpointOperation",
            "Action": "iam:CreateServiceLinkedRole",
            "Effect": "Allow",
            "Resource": "arn:aws:iam::*:role/aws-service-role/sagemaker.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_SageMakerEndpoint",
            "Condition": {
                "StringLike": {
                    "iam:AWSServiceName": "sagemaker.application-autoscaling.amazonaws.com"
                }
            }
        },
        {
            "Sid": "AthenaOperation",
            "Action": [
                "athena:ListTableMetadata",
                "athena:ListDataCatalogs",
                "athena:ListDatabases"
            ],
            "Effect": "Allow",
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "GlueOperation",
            "Action": [
                "glue:GetDatabases",
                "glue:GetPartitions",
                "glue:GetTables"
            ],
            "Effect": "Allow",
            "Resource": [
                "arn:aws:glue:*:*:table/*",
                "arn:aws:glue:*:*:catalog",
                "arn:aws:glue:*:*:database/*"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "QuicksightOperation",
            "Action": [
                "quicksight:ListNamespaces"
            ],
            "Effect": "Allow",
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "AllowUseOfKeyInAccount",
            "Effect": "Allow",
            "Action": [
                "kms:DescribeKey"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/Source": "SageMakerCanvas",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessCreateApplicationOperation",
            "Effect": "Allow",
            "Action": "emr-serverless:CreateApplication",
            "Resource": "arn:aws:emr-serverless:*:*:/*",
            "Condition": {
                "StringEquals": {
                    "aws:RequestTag/sagemaker:is-canvas-resource": "True",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessListApplicationOperation",
            "Effect": "Allow",
            "Action": "emr-serverless:ListApplications",
            "Resource": "arn:aws:emr-serverless:*:*:/*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessApplicationOperations",
            "Effect": "Allow",
            "Action": [
                "emr-serverless:UpdateApplication",
                "emr-serverless:StopApplication",
                "emr-serverless:GetApplication",
                "emr-serverless:StartApplication"
            ],
            "Resource": "arn:aws:emr-serverless:*:*:/applications/*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/sagemaker:is-canvas-resource": "True",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessStartJobRunOperation",
            "Effect": "Allow",
            "Action": "emr-serverless:StartJobRun",
            "Resource": "arn:aws:emr-serverless:*:*:/applications/*",
            "Condition": {
                "StringEquals": {
                    "aws:RequestTag/sagemaker:is-canvas-resource": "True",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessListJobRunOperation",
            "Effect": "Allow",
            "Action": "emr-serverless:ListJobRuns",
            "Resource": "arn:aws:emr-serverless:*:*:/applications/*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/sagemaker:is-canvas-resource": "True",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessJobRunOperations",
            "Effect": "Allow",
            "Action": [
                "emr-serverless:GetJobRun",
                "emr-serverless:CancelJobRun"
            ],
            "Resource": "arn:aws:emr-serverless:*:*:/applications/*/jobruns/*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/sagemaker:is-canvas-resource": "True",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessTagResourceOperation",
            "Effect": "Allow",
            "Action": "emr-serverless:TagResource",
            "Resource": "arn:aws:emr-serverless:*:*:/*",
            "Condition": {
                "StringEquals": {
                    "aws:RequestTag/sagemaker:is-canvas-resource": "True",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "IAMPassOperationForEMRServerless",
            "Effect": "Allow",
            "Action": "iam:PassRole",
            "Resource": [
                "arn:aws:iam::*:role/service-role/AmazonSageMakerCanvasEMRSExecutionAccess-*",
                "arn:aws:iam::*:role/AmazonSageMakerCanvasEMRSExecutionAccess-*"
            ],            
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": "emr-serverless.amazonaws.com",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        }
    ]
}
```

## AWS 托管策略： AmazonSageMakerCanvasDataPrepFullAccess
<a name="security-iam-awsmanpol-AmazonSageMakerCanvasDataPrepFullAccess"></a>

该政策授予的权限允许完全访问 Amazon SageMaker Canvas 的数据准备功能。该政策还为与数据准备功能集成的服务（例如，亚马逊简单存储服务 (Amazon S3)、(IAM)、亚马逊 EMR、 EventBridge亚马逊 AWS Identity and Access Management 、Amazon Redshift、() 和] 提供了最低权限权限。 AWS Key Management Service AWS KMS AWS Secrets Manager

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `sagemaker`：允许主体访问处理作业、训练作业、推理管道、AutoML 作业和特征组。
+ `athena`：允许主体从 Amazon Athena 查询数据目录、数据库和表元数据列表。
+ `elasticmapreduce`：允许主体读取和列出 Amazon EMR 集群。
+ `emr-serverless`：允许主体创建和管理 Amazon EMR Serverless 应用程序和作业运行。还允许委托人标记 SageMaker Canvas 资源。
+ `events`— 允许委托人为计划任务创建、读取、更新和向 Amazon EventBridge 规则添加目标。
+ `glue`— 允许委托人从 AWS Glue 目录中的数据库中获取和搜索表。
+ `iam`— 允许委托人将 IAM 角色传递给 Amazon A SageMaker I 和 Amazon EMR Serverless。 EventBridge还允许主体创建与服务相关联的角色。
+ `kms`— 允许委托人检索存储在作业和终端节点中的 AWS KMS 别名，并访问关联的 KMS 密钥。
+ `logs` - 允许主体发布来自训练作业和端点的日志。
+ `redshift`：允许主体获取访问 Amazon Redshift 数据库的凭证。
+ `redshift-data`：允许主体运行、取消、描述、列出并获取 Amazon Redshift 查询的结果。还允许主体列出 Amazon Redshift 模式和表。
+ `s3` - 允许主体从 Amazon S3 存储桶中添加和检索对象。这些对象仅限于名称包含 “”、SageMaker “Sagemaker” 或 “sagemaker” 的对象；或者标有 “”，不区分大小写的对象。SageMaker
+ `secretsmanager`：允许主体使用保密管理器存储和检索客户数据库凭证。

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "SageMakerListFeatureGroupOperation",
            "Effect": "Allow",
            "Action": "sagemaker:ListFeatureGroups",
            "Resource": "*"
        },
        {
            "Sid": "SageMakerFeatureGroupOperations",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateFeatureGroup",
                "sagemaker:DescribeFeatureGroup"
            ],
            "Resource": "arn:aws:sagemaker:*:*:feature-group/*"
        },
        {
            "Sid": "SageMakerProcessingJobOperations",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateProcessingJob",
                "sagemaker:DescribeProcessingJob",
                "sagemaker:AddTags"
            ],
            "Resource": "arn:aws:sagemaker:*:*:processing-job/*canvas-data-prep*"
        },
        {
            "Sid": "SageMakerProcessingJobListOperation",
            "Effect": "Allow",
            "Action": "sagemaker:ListProcessingJobs",
            "Resource": "*"
        },
        {
            "Sid": "SageMakerPipelineOperations",
            "Effect": "Allow",
            "Action": [
                "sagemaker:DescribePipeline",
                "sagemaker:CreatePipeline",
                "sagemaker:UpdatePipeline",
                "sagemaker:DeletePipeline",
                "sagemaker:StartPipelineExecution",
                "sagemaker:ListPipelineExecutionSteps",
                "sagemaker:DescribePipelineExecution"
            ],
            "Resource": "arn:aws:sagemaker:*:*:pipeline/*canvas-data-prep*"
        },
        {
            "Sid": "KMSListOperations",
            "Effect": "Allow",
            "Action": "kms:ListAliases",
            "Resource": "*"
        },
        {
            "Sid": "KMSOperations",
            "Effect": "Allow",
            "Action": "kms:DescribeKey",
            "Resource": "arn:aws:kms:*:*:key/*"
        },
        {
            "Sid": "S3Operations",
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject",
                "s3:GetBucketCors",
                "s3:GetBucketLocation",
                "s3:AbortMultipartUpload"
            ],
            "Resource": [
                "arn:aws:s3:::*SageMaker*",
                "arn:aws:s3:::*Sagemaker*",
                "arn:aws:s3:::*sagemaker*"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "S3GetObjectOperation",
            "Effect": "Allow",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::*",
            "Condition": {
                "StringEqualsIgnoreCase": {
                    "s3:ExistingObjectTag/SageMaker": "true"
                },
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "S3ListOperations",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:ListAllMyBuckets"
            ],
            "Resource": "*"
        },
        {
            "Sid": "IAMListOperations",
            "Effect": "Allow",
            "Action": "iam:ListRoles",
            "Resource": "*"
        },
        {
            "Sid": "IAMGetOperations",
            "Effect": "Allow",
            "Action": "iam:GetRole",
            "Resource": "arn:aws:iam::*:role/*"
        },
        {
            "Sid": "IAMPassOperation",
            "Effect": "Allow",
            "Action": "iam:PassRole",
            "Resource": "arn:aws:iam::*:role/*",
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": [
                        "sagemaker.amazonaws.com",
                        "events.amazonaws.com"
                    ]
                }
            }
        },
        {
            "Sid": "EventBridgePutOperation",
            "Effect": "Allow",
            "Action": [
                "events:PutRule"
            ],
            "Resource": "arn:aws:events:*:*:rule/*",
            "Condition": {
                "StringEquals": {
                    "aws:RequestTag/sagemaker:is-canvas-data-prep-job": "true"
                }
            }
        },
        {
            "Sid": "EventBridgeOperations",
            "Effect": "Allow",
            "Action": [
                "events:DescribeRule",
                "events:PutTargets"
            ],
            "Resource": "arn:aws:events:*:*:rule/*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/sagemaker:is-canvas-data-prep-job": "true"
                }
            }
        },
        {
            "Sid": "EventBridgeTagBasedOperations",
            "Effect": "Allow",
            "Action": [
                "events:TagResource"
            ],
            "Resource": "arn:aws:events:*:*:rule/*",
            "Condition": {
                "StringEquals": {
                    "aws:RequestTag/sagemaker:is-canvas-data-prep-job": "true",
                    "aws:ResourceTag/sagemaker:is-canvas-data-prep-job": "true"
                }
            }
        },
        {
            "Sid": "EventBridgeListTagOperation",
            "Effect": "Allow",
            "Action": "events:ListTagsForResource",
            "Resource": "*"
        },
        {
            "Sid": "GlueOperations",
            "Effect": "Allow",
            "Action": [
                "glue:GetDatabases",
                "glue:GetTable",
                "glue:GetTables",
                "glue:SearchTables"
            ],
            "Resource": [
                "arn:aws:glue:*:*:table/*",
                "arn:aws:glue:*:*:catalog",
                "arn:aws:glue:*:*:database/*"
            ]
        },
        {
            "Sid": "EMROperations",
            "Effect": "Allow",
            "Action": [
                "elasticmapreduce:DescribeCluster",
                "elasticmapreduce:ListInstanceGroups"
            ],
            "Resource": "arn:aws:elasticmapreduce:*:*:cluster/*"
        },
        {
            "Sid": "EMRListOperation",
            "Effect": "Allow",
            "Action": "elasticmapreduce:ListClusters",
            "Resource": "*"
        },
        {
            "Sid": "AthenaListDataCatalogOperation",
            "Effect": "Allow",
            "Action": "athena:ListDataCatalogs",
            "Resource": "*"
        },
        {
            "Sid": "AthenaQueryExecutionOperations",
            "Effect": "Allow",
            "Action": [
                "athena:GetQueryExecution",
                "athena:GetQueryResults",
                "athena:StartQueryExecution",
                "athena:StopQueryExecution"
            ],
            "Resource": "arn:aws:athena:*:*:workgroup/*"
        },
        {
            "Sid": "AthenaDataCatalogOperations",
            "Effect": "Allow",
            "Action": [
                "athena:ListDatabases",
                "athena:ListTableMetadata"
            ],
            "Resource": "arn:aws:athena:*:*:datacatalog/*"
        },
        {
            "Sid": "RedshiftOperations",
            "Effect": "Allow",
            "Action": [
                "redshift-data:DescribeStatement",
                "redshift-data:CancelStatement",
                "redshift-data:GetStatementResult"
            ],
            "Resource": "*"
        },
        {
            "Sid": "RedshiftArnBasedOperations",
            "Effect": "Allow",
            "Action": [
                "redshift-data:ExecuteStatement",
                "redshift-data:ListSchemas",
                "redshift-data:ListTables"
            ],
            "Resource": "arn:aws:redshift:*:*:cluster:*"
        },
        {
            "Sid": "RedshiftGetCredentialsOperation",
            "Effect": "Allow",
            "Action": "redshift:GetClusterCredentials",
            "Resource": [
                "arn:aws:redshift:*:*:dbuser:*/sagemaker_access*",
                "arn:aws:redshift:*:*:dbname:*"
            ]
        },
        {
            "Sid": "SecretsManagerARNBasedOperation",
            "Effect": "Allow",
            "Action": "secretsmanager:CreateSecret",
            "Resource": "arn:aws:secretsmanager:*:*:secret:AmazonSageMaker-*"
        },
        {
            "Sid": "SecretManagerTagBasedOperation",
            "Effect": "Allow",
            "Action": [
                "secretsmanager:DescribeSecret",
                "secretsmanager:GetSecretValue"
            ],
            "Resource": "arn:aws:secretsmanager:*:*:secret:AmazonSageMaker-*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/SageMaker": "true",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "RDSOperation",
            "Effect": "Allow",
            "Action": "rds:DescribeDBInstances",
            "Resource": "*"
        },
        {
            "Sid": "LoggingOperation",
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": "arn:aws:logs:*:*:log-group:/aws/sagemaker/studio:*"
        },
        {
            "Sid": "EMRServerlessCreateApplicationOperation",
            "Effect": "Allow",
            "Action": "emr-serverless:CreateApplication",
            "Resource": "arn:aws:emr-serverless:*:*:/*",
            "Condition": {
                "StringEquals": {
                    "aws:RequestTag/sagemaker:is-canvas-resource": "True",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessListApplicationOperation",
            "Effect": "Allow",
            "Action": "emr-serverless:ListApplications",
            "Resource": "arn:aws:emr-serverless:*:*:/*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessApplicationOperations",
            "Effect": "Allow",
            "Action": [
                "emr-serverless:UpdateApplication",
                "emr-serverless:GetApplication"
            ],
            "Resource": "arn:aws:emr-serverless:*:*:/applications/*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/sagemaker:is-canvas-resource": "True",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessStartJobRunOperation",
            "Effect": "Allow",
            "Action": "emr-serverless:StartJobRun",
            "Resource": "arn:aws:emr-serverless:*:*:/applications/*",
            "Condition": {
                "StringEquals": {
                    "aws:RequestTag/sagemaker:is-canvas-resource": "True",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessListJobRunOperation",
            "Effect": "Allow",
            "Action": "emr-serverless:ListJobRuns",
            "Resource": "arn:aws:emr-serverless:*:*:/applications/*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/sagemaker:is-canvas-resource": "True",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessJobRunOperations",
            "Effect": "Allow",
            "Action": [
                "emr-serverless:GetJobRun",
                "emr-serverless:CancelJobRun"
            ],
            "Resource": "arn:aws:emr-serverless:*:*:/applications/*/jobruns/*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/sagemaker:is-canvas-resource": "True",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "EMRServerlessTagResourceOperation",
            "Effect": "Allow",
            "Action": "emr-serverless:TagResource",
            "Resource": "arn:aws:emr-serverless:*:*:/*",
            "Condition": {
                "StringEquals": {
                    "aws:RequestTag/sagemaker:is-canvas-resource": "True",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "IAMPassOperationForEMRServerless",
            "Effect": "Allow",
            "Action": "iam:PassRole",
            "Resource": [
                "arn:aws:iam::*:role/service-role/AmazonSageMakerCanvasEMRSExecutionAccess-*",
                "arn:aws:iam::*:role/AmazonSageMakerCanvasEMRSExecutionAccess-*"
            ],            
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": "emr-serverless.amazonaws.com",
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        }
    ]
}
```

## AWS 托管策略： AmazonSageMakerCanvasDirectDeployAccess
<a name="security-iam-awsmanpol-AmazonSageMakerCanvasDirectDeployAccess"></a>

该政策授予 Amazon SageMaker Canvas 创建和管理亚马逊 A SageMaker I 终端节点所需的权限。

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `sagemaker`— 允许委托人使用以 “Canv SageMaker as” 或 “画布” 开头的 ARN 资源名称创建和管理 AI 端点。
+ `cloudwatch`— 允许委托人检索 Amazon CloudWatch 指标数据。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "SageMakerEndpointPerms",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateEndpoint",
                "sagemaker:CreateEndpointConfig",
                "sagemaker:DeleteEndpoint",
                "sagemaker:DescribeEndpoint",
                "sagemaker:DescribeEndpointConfig",
                "sagemaker:InvokeEndpoint",
                "sagemaker:UpdateEndpoint"
            ],
            "Resource": [
                "arn:aws:sagemaker:*:*:Canvas*",
                "arn:aws:sagemaker:*:*:canvas*"
            ]
        },
        {
            "Sid": "ReadCWInvocationMetrics",
            "Effect": "Allow",
            "Action": "cloudwatch:GetMetricData",
            "Resource": "*"
        }
    ]
}
```

------

## AWS 托管策略： AmazonSageMakerCanvasAIServices访问权限
<a name="security-iam-awsmanpol-AmazonSageMakerCanvasAIServicesAccess"></a>

该政策授予亚马逊 SageMaker Canvas 使用亚马逊 Textract、Amazon Rekognition、Amazon Comprehend 和亚马逊 Bedrock 的权限。

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `textract` - 允许主体使用 Amazon Textract 检测图像中的文档、费用和身份。
+ `rekognition` - 允许主体使用 Amazon Rekognition 检测图像中的标签和文本。
+ `comprehend` - 允许主体使用 Amazon Comprehend 检测文本文档中的情绪和主要语言，以及姓名和个人身份信息 (PII) 实体。
+ `bedrock` - 允许主体使用 Amazon Bedrock 列出和调用基础模型。
+ `iam`：允许主体将 IAM 角色传递给 Amazon Bedrock。

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "Textract",
            "Effect": "Allow",
            "Action": [
                "textract:AnalyzeDocument",
                "textract:AnalyzeExpense",
                "textract:AnalyzeID",
                "textract:StartDocumentAnalysis",
                "textract:StartExpenseAnalysis",
                "textract:GetDocumentAnalysis",
                "textract:GetExpenseAnalysis"
            ],
            "Resource": "*"
        },
        {
            "Sid": "Rekognition",
            "Effect": "Allow",
            "Action": [
                "rekognition:DetectLabels",
                "rekognition:DetectText"
            ],
            "Resource": "*"
        },
        {
            "Sid": "Comprehend",
            "Effect": "Allow",
            "Action": [
                "comprehend:BatchDetectDominantLanguage",
                "comprehend:BatchDetectEntities",
                "comprehend:BatchDetectSentiment",
                "comprehend:DetectPiiEntities",
                "comprehend:DetectEntities",
                "comprehend:DetectSentiment",
                "comprehend:DetectDominantLanguage"
            ],
            "Resource": "*"
        },
        {
            "Sid": "Bedrock",
            "Effect": "Allow",
            "Action": [
                "bedrock:InvokeModel",
                "bedrock:ListFoundationModels",
                "bedrock:InvokeModelWithResponseStream"
            ],
            "Resource": "*"
        },
        {
            "Sid": "CreateBedrockResourcesPermission",
            "Effect": "Allow",
            "Action": [
                "bedrock:CreateModelCustomizationJob",
                "bedrock:CreateProvisionedModelThroughput",
                "bedrock:TagResource"
            ],
            "Resource": [
                "arn:aws:bedrock:*:*:model-customization-job/*",
                "arn:aws:bedrock:*:*:custom-model/*",
                "arn:aws:bedrock:*:*:provisioned-model/*"
            ],
            "Condition": {
                "ForAnyValue:StringEquals": {
                    "aws:TagKeys": [
                        "SageMaker",
                        "Canvas"
                    ]
                },
                "StringEquals": {
                    "aws:RequestTag/SageMaker": "true",
                    "aws:RequestTag/Canvas": "true",
                    "aws:ResourceTag/SageMaker": "true",
                    "aws:ResourceTag/Canvas": "true"
                }
            }
        },
        {
            "Sid": "GetStopAndDeleteBedrockResourcesPermission",
            "Effect": "Allow",
            "Action": [
                "bedrock:GetModelCustomizationJob",
                "bedrock:GetCustomModel",
                "bedrock:GetProvisionedModelThroughput",
                "bedrock:StopModelCustomizationJob",
                "bedrock:DeleteProvisionedModelThroughput"
            ],
            "Resource": [
                "arn:aws:bedrock:*:*:model-customization-job/*",
                "arn:aws:bedrock:*:*:custom-model/*",
                "arn:aws:bedrock:*:*:provisioned-model/*"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/SageMaker": "true",
                    "aws:ResourceTag/Canvas": "true"
                }
            }
        },
        {
            "Sid": "FoundationModelPermission",
            "Effect": "Allow",
            "Action": [
                "bedrock:CreateModelCustomizationJob"
            ],
            "Resource": [
                "arn:aws:bedrock:*::foundation-model/*"
            ]
        },
        {
            "Sid": "BedrockFineTuningPassRole",
            "Effect": "Allow",
            "Action": [
                "iam:PassRole"
            ],
            "Resource": [
                "arn:aws:iam::*:role/*"
            ],
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": "bedrock.amazonaws.com"
                }
            }
        }
    ]
}
```

## AWS 托管策略： AmazonSageMakerCanvasBedrockAccess
<a name="security-iam-awsmanpol-AmazonSageMakerCanvasBedrockAccess"></a>

该政策授予将 Amazon C SageMaker anvas 与 Amazon Bedrock 配合使用通常所需的权限。

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `s3`：允许主体从“sagemaker-\$1/Canvas”目录下的 Amazon S3 存储桶中添加和获取对象。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "S3CanvasAccess",
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": [
                "arn:aws:s3:::sagemaker-*/Canvas",
                "arn:aws:s3:::sagemaker-*/Canvas/*"
            ]
        },
        {
            "Sid": "S3BucketAccess",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::sagemaker-*"
            ]
        }
    ]
}
```

------

## AWS 托管策略： AmazonSageMakerCanvasForecastAccess
<a name="security-iam-awsmanpol-AmazonSageMakerCanvasForecastAccess"></a>

该政策授予将亚马逊 Canvas 与 Amazon For SageMaker ecast 配合使用通常所需的权限。

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `s3` - 允许主体从 Amazon S3 存储桶中添加和检索对象。这些对象仅限于名称以“sagemaker-”开头的对象。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": [
                "arn:aws:s3:::sagemaker-*/Canvas",
                "arn:aws:s3:::sagemaker-*/canvas"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::sagemaker-*"
            ]
        }
    ]
}
```

------

## AWS 托管策略： AmazonSageMakerCanvasEMRServerlessExecutionRolePolicy
<a name="security-iam-awsmanpol-AmazonSageMakerCanvasEMRServerlessExecutionRolePolicy"></a>

该政策向亚马逊 EMR Serverless 授予权限，允许其使用诸如 Amazon S3 之类的 AWS 服务，这些服务由 Amazon SageMaker Canvas 用于处理大型数据。

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `s3` - 允许主体从 Amazon S3 存储桶中添加和检索对象。这些对象仅限于名称包含 “” SageMaker 或 “sagemaker” 的对象；或者标有 SageMaker “”，不区分大小写的对象。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "S3Operations",
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject",
                "s3:GetBucketCors",
                "s3:GetBucketLocation",
                "s3:AbortMultipartUpload"
            ],
            "Resource": [
                "arn:aws:s3:::*SageMaker*",
                "arn:aws:s3:::*sagemaker*"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "S3GetObjectOperation",
            "Effect": "Allow",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::*",
            "Condition": {
                "StringEqualsIgnoreCase": {
                    "s3:ExistingObjectTag/SageMaker": "true"
                },
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "S3ListOperations",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:ListAllMyBuckets"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        }
    ]
}
```

------

## AWS 托管策略： AmazonSageMakerCanvasSMDataScienceAssistantAccess
<a name="security-iam-awsmanpol-AmazonSageMakerCanvasSMDataScienceAssistantAccess"></a>

此政策授予 Amazon SageMaker Canvas 中的用户开始与 Amazon Q 开发者对话的权限。此功能需要 Amazon Q Developer 和 SageMaker AI 数据科学助手服务的权限。

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `q` – 允许主体向 Amazon Q 开发者版发送提示。
+ `sagemaker-data-science-assistant`— 允许校长向 SageMaker Canvas 数据科学助手服务发送提示。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "SageMakerDataScienceAssistantAccess",
            "Effect": "Allow",
            "Action": [
                "sagemaker-data-science-assistant:SendConversation"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "AmazonQDeveloperAccess",
            "Effect": "Allow",
            "Action": [
                "q:SendMessage",
                "q:StartConversation"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        }
    ]
}
```

------

## 亚马逊 SageMaker AI 更新了亚马逊 SageMaker Canvas 托管政策
<a name="security-iam-awsmanpol-canvas-updates"></a>

查看自该服务开始跟踪这些更改以来对 SageMaker Canvas AWS 托管策略的更新的详细信息。


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
|  [AmazonSageMakerCanvasSMDataScienceAssistantAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasSMDataScienceAssistantAccess) – 对现有策略的更新  | 2 |  添加 `q:StartConversation` 权限  | 2025 年 1 月 14 日 | 
|  [AmazonSageMakerCanvasSMDataScienceAssistantAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasSMDataScienceAssistantAccess)：新策略  | 1 |  初始策略  | 2024 年 12 月 4 日 | 
|  [AmazonSageMakerCanvasDataPrepFullAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasDataPrepFullAccess) – 对现有策略的更新  | 4 |  为 `IAMPassOperationForEMRServerless` 权限添加资源。  | 2024 年 8 月 16 日 | 
|  [AmazonSageMakerCanvasFullAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasFullAccess) – 对现有策略的更新  | 11 |  为 `IAMPassOperationForEMRServerless` 权限添加资源。  | 2024 年 8 月 15 日 | 
|  [AmazonSageMakerCanvasEMRServerlessExecutionRolePolicy](#security-iam-awsmanpol-AmazonSageMakerCanvasEMRServerlessExecutionRolePolicy)：新策略  | 1 |  初始策略  | 2024 年 7 月 26 日 | 
|  AmazonSageMakerCanvasDataPrepFullAccess – 对现有策略的更新  | 3 |  添加 `emr-serverless:CreateApplication`、`emr-serverless:ListApplications`、`emr-serverless:UpdateApplication`、`emr-serverless:GetApplication`、`emr-serverless:StartJobRun`、`emr-serverless:ListJobRuns`、`emr-serverless:GetJobRun`、`emr-serverless:CancelJobRun` 和 `emr-serverless:TagResource` 权限。  | 2024 年 7 月 18 日 | 
| AmazonSageMakerCanvasFullAccess -更新现有政策 | 10 |  添加 `application-autoscaling:DescribeScalingActivities` `iam:PassRole`、`kms:DescribeKey` 和 `quicksight:ListNamespaces` 权限。 添加 `sagemaker:CreateTrainingJob`、`sagemaker:CreateTransformJob`、`sagemaker:DescribeTrainingJob`、`sagemaker:DescribeTransformJob`、`sagemaker:StopAutoMLJob`、`sagemaker:StopTrainingJob` 和 `sagemaker:StopTransformJob` 权限。 添加 `athena:ListTableMetadata`、`athena:ListDataCatalogs` 和 `athena:ListDatabases` 权限。 添加 `glue:GetDatabases`、`glue:GetPartitions` 和 `glue:GetTables` 权限。 添加 `emr-serverless:CreateApplication`、`emr-serverless:ListApplications`、`emr-serverless:UpdateApplication`、`emr-serverless:StopApplication`、`emr-serverless:GetApplication`、`emr-serverless:StartApplication`、`emr-serverless:StartJobRun`、`emr-serverless:ListJobRuns`、`emr-serverless:GetJobRun`、`emr-serverless:CancelJobRun` 和 `emr-serverless:TagResource` 权限。  | 2024 年 7 月 9 日 | 
|  [AmazonSageMakerCanvasBedrockAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasBedrockAccess)：新策略  | 1 |  初始策略  | 2024 年 2 月 2 日 | 
| AmazonSageMakerCanvasFullAccess -更新现有政策 | 9 |  添加 `sagemaker:ListEndpoints` 权限  | 2024 年 1 月 24 日 | 
| AmazonSageMakerCanvasFullAccess -更新现有政策 | 8 |  添加 `sagemaker:UpdateEndpointWeightsAndCapacities`、`sagemaker:DescribeEndpointConfig`、`sagemaker:InvokeEndpointAsync`、`athena:ListDataCatalogs`、`athena:GetQueryExecution`、`athena:GetQueryResults`、`athena:StartQueryExecution`、`athena:StopQueryExecution`、`athena:ListDatabases`、`cloudwatch:DescribeAlarms`、`cloudwatch:PutMetricAlarm`、`cloudwatch:DeleteAlarms` 和 `iam:CreateServiceLinkedRole` 权限。  | 2023 年 12 月 8 日 | 
|  AmazonSageMakerCanvasDataPrepFullAccess – 对现有策略的更新  | 2 |  小幅更新，以执行先前策略第 1 版的意图；未添加或删除任何权限。  | 2023 年 12 月 7 日 | 
|  [AmazonSageMakerCanvasAIServices访问权限](#security-iam-awsmanpol-AmazonSageMakerCanvasAIServicesAccess) – 对现有策略的更新  | 3 |  添加 `bedrock:InvokeModelWithResponseStream`、`bedrock:GetModelCustomizationJob`、`bedrock:StopModelCustomizationJob`、`bedrock:GetCustomModel`、`bedrock:GetProvisionedModelThroughput`、`bedrock:DeleteProvisionedModelThroughput`、`bedrock:TagResource`、`bedrock:CreateModelCustomizationJob`、`bedrock:CreateProvisionedModelThroughput` 和 `iam:PassRole` 权限。  | 2023 年 11 月 29 日 | 
|  AmazonSageMakerCanvasDataPrepFullAccess -新政策  | 1 |  初始策略  | 2023 年 10 月 26 日 | 
|  [AmazonSageMakerCanvasDirectDeployAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasDirectDeployAccess)：新策略  | 1 |  初始策略  | 2023 年 10 月 6 日 | 
| AmazonSageMakerCanvasFullAccess -更新现有政策 | 7 |  添加 `sagemaker:DeleteEndpointConfig`、`sagemaker:DeleteModel` 和 `sagemaker:InvokeEndpoint` 权限。还要为特定区域的 JumpStart资源添加`s3:GetObject`权限。  | 2023 年 9 月 29 日 | 
|  AmazonSageMakerCanvasAIServices访问权限-更新现有策略  | 2 |  添加 `bedrock:InvokeModel` 和 `bedrock:ListFoundationModels` 权限。  | 2023 年 9 月 29 日 | 
| AmazonSageMakerCanvasFullAccess -更新现有政策 | 6 |  添加 `rds:DescribeDBInstances` 权限  | 2023 年 8 月 29 日 | 
| AmazonSageMakerCanvasFullAccess -更新现有政策 | 5 |  添加 `application-autoscaling:PutScalingPolicy` 和 `application-autoscaling:RegisterScalableTarget` 权限。  | 2023 年 7 月 24 日 | 
| AmazonSageMakerCanvasFullAccess -更新现有政策 | 4 |  添加 `sagemaker:CreateModelPackage`、`sagemaker:CreateModelPackageGroup`、`sagemaker:DescribeModelPackage`、`sagemaker:DescribeModelPackageGroup`、`sagemaker:ListModelPackages` 和 `sagemaker:ListModelPackageGroups` 权限。  | 2023 年 5 月 4 日 | 
| AmazonSageMakerCanvasFullAccess -更新现有政策  | 3 |  添加 `sagemaker:CreateAutoMLJobV2`、`sagemaker:DescribeAutoMLJobV2` 和 `glue:SearchTables` 权限。  | 2023 年 3 月 24 日 | 
|  AmazonSageMakerCanvasAIServices访问权限-新政策  | 1 |  初始策略  | 2023 年 3 月 23 日 | 
| AmazonSageMakerCanvasFullAccess -更新现有政策 | 2 |  添加 `forecast:DeleteResourceTree` 权限  | 2022 年 12 月 6 日 | 
| AmazonSageMakerCanvasFullAccess -新政策 | 1 |  初始策略  | 2022 年 9 月 8 日 | 
|  [AmazonSageMakerCanvasForecastAccess](#security-iam-awsmanpol-AmazonSageMakerCanvasForecastAccess)：新策略  | 1 |  初始策略  | 2022 年 8 月 24 日 | 

# AWS Amazon SageMaker 特色商店的托管政策
<a name="security-iam-awsmanpol-feature-store"></a>

这些 AWS 托管策略添加了使用功能商店所需的权限。这些策略可在您的 AWS 账户中使用，并由从 SageMaker AI 控制台创建的执行角色使用。

**Topics**
+ [AWS 托管策略： AmazonSageMakerFeatureStoreAccess](#security-iam-awsmanpol-AmazonSageMakerFeatureStoreAccess)
+ [亚马逊 SageMaker AI 更新了亚马逊 SageMaker 功能商店托管政策](#security-iam-awsmanpol-feature-store-updates)

## AWS 托管策略： AmazonSageMakerFeatureStoreAccess
<a name="security-iam-awsmanpol-AmazonSageMakerFeatureStoreAccess"></a>

此策略授予为亚马逊 SageMaker 特色商店功能组启用离线商店所需的权限。

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `s3` - 允许主体将数据写入离线存储 Amazon S3 存储桶。这些桶仅限于名字中包含 “”、SageMaker “Sagemaker” 或 “sagemaker” 的桶。
+ `s3` - 允许主体读取保存在离线存储 S3 存储桶 `metadata` 文件夹中的现有清单文件。
+ `glue`— 允许校长读取和更新 AWS Glue 表。这些权限仅限于 `sagemaker_featurestore` 文件夹中的表。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:GetBucketAcl",
                "s3:PutObjectAcl"
            ],
            "Resource": [
                "arn:aws:s3:::*SageMaker*",
                "arn:aws:s3:::*Sagemaker*",
                "arn:aws:s3:::*sagemaker*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::*SageMaker*/metadata/*",
                "arn:aws:s3:::*Sagemaker*/metadata/*",
                "arn:aws:s3:::*sagemaker*/metadata/*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "glue:GetTable",
                "glue:UpdateTable"
            ],
            "Resource": [
                "arn:aws:glue:*:*:catalog",
                "arn:aws:glue:*:*:database/sagemaker_featurestore",
                "arn:aws:glue:*:*:table/sagemaker_featurestore/*"
            ]
        }
    ]
}
```

------

## 亚马逊 SageMaker AI 更新了亚马逊 SageMaker 功能商店托管政策
<a name="security-iam-awsmanpol-feature-store-updates"></a>

查看自该服务开始跟踪这些更改以来，Feature Store AWS 托管政策更新的详细信息。要获得有关此页面变更的自动提醒，请订阅 SageMaker AI [文档历史记录页面上的 RSS 提要。](doc-history.md)


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
|  [AmazonSageMakerFeatureStoreAccess](#security-iam-awsmanpol-AmazonSageMakerFeatureStoreAccess) – 对现有策略的更新  | 3 |  添加 `s3:GetObject`、`glue:GetTable` 和 `glue:UpdateTable` 权限。  | 2022 年 12 月 5 日 | 
| AmazonSageMakerFeatureStoreAccess -更新现有政策 | 2 |  添加 `s3:PutObjectAcl` 权限  | 2021 年 2 月 23 日 | 
| AmazonSageMakerFeatureStoreAccess -新政策 | 1 |  初始策略  | 2020 年 12 月 1 日 | 

# AWS Amazon SageMaker 地理空间的托管政策
<a name="security-iam-awsmanpol-geospatial"></a>

这些 AWS 托管策略添加了使用 SageMaker 地理空间所需的权限。这些策略可在您的 AWS 账户中使用，并由从 SageMaker AI 控制台创建的执行角色使用。

**Topics**
+ [AWS 托管策略： AmazonSageMakerGeospatialFullAccess](#security-iam-awsmanpol-AmazonSageMakerGeospatialFullAccess)
+ [AWS 托管策略： AmazonSageMakerGeospatialExecutionRole](#security-iam-awsmanpol-AmazonSageMakerGeospatialExecutionRole)
+ [亚马逊 SageMaker AI 更新了亚马逊 SageMaker 地理空间托管政策](#security-iam-awsmanpol-geospatial-updates)

## AWS 托管策略： AmazonSageMakerGeospatialFullAccess
<a name="security-iam-awsmanpol-AmazonSageMakerGeospatialFullAccess"></a>

此政策授予的权限允许通过 AWS 管理控制台 和 SDK 完全访问 Amazon SageMaker 地理空间。

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `sagemaker-geospatial`— 允许委托人完全访问所有 SageMaker 地理空间资源。
+ `iam`— 允许委托人将 IAM 角色传递给 SageMaker 地理空间。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "sagemaker-geospatial:*",
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": ["iam:PassRole"],
      "Resource": "arn:aws:iam::*:role/*",
      "Condition": {
        "StringEquals": {
          "iam:PassedToService": [
            "sagemaker-geospatial.amazonaws.com"
           ]
        }
      }
    }
  ]
}
```

------

## AWS 托管策略： AmazonSageMakerGeospatialExecutionRole
<a name="security-iam-awsmanpol-AmazonSageMakerGeospatialExecutionRole"></a>

此策略授予使用 SageMaker 地理空间通常所需的权限。

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `s3` - 允许主体从 Amazon S3 存储桶中添加和检索对象。这些对象仅限于名称包含 “”、SageMaker “Sagemaker” 或 “sagemaker” 的对象。
+ `sagemaker-geospatial` - 允许主体通过 `GetEarthObservationJob` API 访问地球观测作业。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
          "s3:AbortMultipartUpload",
          "s3:PutObject",
          "s3:GetObject",
          "s3:ListBucketMultipartUploads"
      ],
      "Resource": [
        "arn:aws:s3:::*SageMaker*",
        "arn:aws:s3:::*Sagemaker*",
        "arn:aws:s3:::*sagemaker*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": "sagemaker-geospatial:GetEarthObservationJob",
      "Resource": "arn:aws:sagemaker-geospatial:*:*:earth-observation-job/*"
    },
    {
      "Effect": "Allow",
      "Action": "sagemaker-geospatial:GetRasterDataCollection",
      "Resource": "arn:aws:sagemaker-geospatial:*:*:raster-data-collection/*"
    }
  ]
}
```

------

## 亚马逊 SageMaker AI 更新了亚马逊 SageMaker 地理空间托管政策
<a name="security-iam-awsmanpol-geospatial-updates"></a>

查看有关自该服务开始跟踪 SageMaker 地理空间 AWS 托管策略变更以来这些更新的详细信息。


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
|  [AmazonSageMakerGeospatialExecutionRole](#security-iam-awsmanpol-AmazonSageMakerGeospatialExecutionRole)：更新策略  | 2 |  添加 `sagemaker-geospatial:GetRasterDataCollection` 权限  | 2023 年 5 月 10 日 | 
|  [AmazonSageMakerGeospatialFullAccess](#security-iam-awsmanpol-AmazonSageMakerGeospatialFullAccess)：新策略  | 1 |  初始策略  | 2022 年 11 月 30 日 | 
| AmazonSageMakerGeospatialExecutionRole -新政策 | 1 |  初始策略  | 2022 年 11 月 30 日 | 

# AWS 亚马逊 G SageMaker round Truth 的托管政策
<a name="security-iam-awsmanpol-ground-truth"></a>

这些 AWS 托管策略增加了使用 SageMaker AI Ground Truth 所需的权限。这些策略可在您的 AWS 账户中使用，并由从 SageMaker AI 控制台创建的执行角色使用。

**Topics**
+ [AWS 托管策略： AmazonSageMakerGroundTruthExecution](#security-iam-awsmanpol-gt-AmazonSageMakerGroundTruthExecution)
+ [亚马逊 A SageMaker I 更新了 A SageMaker I Ground Truth 托管政策](#security-iam-awsmanpol-groundtruth-updates)

## AWS 托管策略： AmazonSageMakerGroundTruthExecution
<a name="security-iam-awsmanpol-gt-AmazonSageMakerGroundTruthExecution"></a>

此 AWS 托管策略授予使用 SageMaker AI Ground Truth 通常所需的权限。

**权限详细信息**

该策略包含以下权限。
+ `lambda`— 允许委托人调用名称包含 “sagemaker”（不区分大小写）、GtRecipe “” 或 “” 的 Lambda 函数。LabelingFunction
+ `s3` - 允许主体从 Amazon S3 存储桶中添加和检索对象。这些对象仅限于那些不区分大小写的名称包含 “groundtruth” 或 “sagemaker”，或者标有 “” 的对象。SageMaker
+ `cloudwatch`— 允许校长发布 CloudWatch 指标。
+ `logs` - 允许主体创建和访问日志流，并发布日志事件。
+ `sqs` - 允许主体创建 Amazon SQS 队列以及发送和接收 Amazon SQS 消息。这些权限仅限于名称包含 “GroundTruth” 的队列。
+ `sns` 允许主体订阅名称包含“groundtruth”或“sagemaker”的 Amazon SNS 主题（不区分大小写）并向其发布消息。
+ `ec2`— 允许委托人创建、描述和删除 VPC 终端节点服务名称包含 “” 或 “标签” 的 Amazon VPC 终端节点。sagemaker-task-resources

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "CustomLabelingJobs",
            "Effect": "Allow",
            "Action": [
                "lambda:InvokeFunction"
            ],
            "Resource": [
                "arn:aws:lambda:*:*:function:*GtRecipe*",
                "arn:aws:lambda:*:*:function:*LabelingFunction*",
                "arn:aws:lambda:*:*:function:*SageMaker*",
                "arn:aws:lambda:*:*:function:*sagemaker*",
                "arn:aws:lambda:*:*:function:*Sagemaker*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:AbortMultipartUpload",
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": [
                "arn:aws:s3:::*GroundTruth*",
                "arn:aws:s3:::*Groundtruth*",
                "arn:aws:s3:::*groundtruth*",
                "arn:aws:s3:::*SageMaker*",
                "arn:aws:s3:::*Sagemaker*",
                "arn:aws:s3:::*sagemaker*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject"
            ],
            "Resource": "*",
            "Condition": {
                "StringEqualsIgnoreCase": {
                    "s3:ExistingObjectTag/SageMaker": "true"
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetBucketLocation",
                "s3:ListBucket"
            ],
            "Resource": "*"
        },
        {
            "Sid": "CloudWatch",
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricData",
                "logs:CreateLogStream",
                "logs:CreateLogGroup",
                "logs:DescribeLogStreams",
                "logs:PutLogEvents"
            ],
            "Resource": "*"
        },
        {
            "Sid": "StreamingQueue",
            "Effect": "Allow",
            "Action": [
                "sqs:CreateQueue",
                "sqs:DeleteMessage",
                "sqs:GetQueueAttributes",
                "sqs:GetQueueUrl",
                "sqs:ReceiveMessage",
                "sqs:SendMessage",
                "sqs:SetQueueAttributes"
            ],
            "Resource": "arn:aws:sqs:*:*:*GroundTruth*"
        },
        {
            "Sid": "StreamingTopicSubscribe",
            "Effect": "Allow",
            "Action": "sns:Subscribe",
            "Resource": [
                "arn:aws:sns:*:*:*GroundTruth*",
                "arn:aws:sns:*:*:*Groundtruth*",
                "arn:aws:sns:*:*:*groundTruth*",
                "arn:aws:sns:*:*:*groundtruth*",
                "arn:aws:sns:*:*:*SageMaker*",
                "arn:aws:sns:*:*:*Sagemaker*",
                "arn:aws:sns:*:*:*sageMaker*",
                "arn:aws:sns:*:*:*sagemaker*"
            ],
            "Condition": {
                "StringEquals": {
                    "sns:Protocol": "sqs"
                },
                "StringLike": {
                    "sns:Endpoint": "arn:aws:sqs:*:*:*GroundTruth*"
                }
            }
        },
        {
            "Sid": "StreamingTopic",
            "Effect": "Allow",
            "Action": [
                "sns:Publish"
            ],
            "Resource": [
                "arn:aws:sns:*:*:*GroundTruth*",
                "arn:aws:sns:*:*:*Groundtruth*",
                "arn:aws:sns:*:*:*groundTruth*",
                "arn:aws:sns:*:*:*groundtruth*",
                "arn:aws:sns:*:*:*SageMaker*",
                "arn:aws:sns:*:*:*Sagemaker*",
                "arn:aws:sns:*:*:*sageMaker*",
                "arn:aws:sns:*:*:*sagemaker*"
            ]
        },
        {
            "Sid": "StreamingTopicUnsubscribe",
            "Effect": "Allow",
            "Action": [
                "sns:Unsubscribe"
            ],
            "Resource": "*"
        },
        {
            "Sid": "WorkforceVPC",
            "Effect": "Allow",
            "Action": [
                "ec2:CreateVpcEndpoint",
                "ec2:DescribeVpcEndpoints",
                "ec2:DeleteVpcEndpoints"
            ],
            "Resource": "*",
            "Condition": {
                "StringLikeIfExists": {
                    "ec2:VpceServiceName": [
                        "*sagemaker-task-resources*",
                        "aws.sagemaker*labeling*"
                    ]
                }
            }
        }
    ]
}
```

------

## 亚马逊 A SageMaker I 更新了 A SageMaker I Ground Truth 托管政策
<a name="security-iam-awsmanpol-groundtruth-updates"></a>

查看自该服务开始跟踪这些更改以来，Amazon SageMaker AI Ground Truth AWS 托管政策更新的详细信息。


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
|  [AmazonSageMakerGroundTruthExecution](#security-iam-awsmanpol-gt-AmazonSageMakerGroundTruthExecution) – 对现有策略的更新  | 3 |  添加 `ec2:CreateVpcEndpoint`、`ec2:DescribeVpcEndpoints` 和 `ec2:DeleteVpcEndpoints` 权限。  | 2022 年 4 月 29 日 | 
| AmazonSageMakerGroundTruthExecution -更新现有政策 | 2 |  删除 `sqs:SendMessageBatch` 权限。  | 2022 年 4 月 11 日 | 
| AmazonSageMakerGroundTruthExecution -新政策 | 1 |  初始策略  | 2020 年 7 月 20 日 | 

# AWS Amazon 的托管政策 SageMaker HyperPod
<a name="security-iam-awsmanpol-hyperpod"></a>

以下 AWS 托管策略添加了使用 Amazon 所需的权限 SageMaker HyperPod。这些策略可在您的 AWS 账户中使用，由从 SageMaker AI 控制台创建的执行角色或 HyperPod 服务相关角色使用。

**Topics**
+ [AWS 托管策略： AmazonSageMakerHyperPodTrainingOperatorAccess](security-iam-awsmanpol-AmazonSageMakerHyperPodTrainingOperatorAccess.md)
+ [AWS 托管策略： AmazonSageMakerHyperPodObservabilityAdminAccess](security-iam-awsmanpol-AmazonSageMakerHyperPodObservabilityAdminAccess.md)
+ [AWS 托管策略： AmazonSageMakerHyperPodServiceRolePolicy](security-iam-awsmanpol-AmazonSageMakerHyperPodServiceRolePolicy.md)
+ [AWS 托管策略： AmazonSageMakerClusterInstanceRolePolicy](security-iam-awsmanpol-AmazonSageMakerClusterInstanceRolePolicy.md)
+ [亚马逊 SageMaker AI 更新了 SageMaker HyperPod 托管策略](#security-iam-awsmanpol-hyperpod-updates)

# AWS 托管策略： AmazonSageMakerHyperPodTrainingOperatorAccess
<a name="security-iam-awsmanpol-AmazonSageMakerHyperPodTrainingOperatorAccess"></a>

此策略提供设置 SageMaker HyperPod 培训操作员所需的管理权限。它允许访问 SageMaker HyperPod 和 Amazon EKS 附加组件。该政策包括描述您账户中 SageMaker HyperPod 资源的权限。

**权限详细信息**

该策略包含以下权限：
+ `sagemaker:DescribeClusterNode`-允许用户返回有关 HyperPod 集群的信息。

要查看此策略的权限，请参阅《 AWS 托管策略参考》[AmazonSageMakerHyperPodTrainingOperatorAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonSageMakerHyperPodTrainingOperatorAccess.html)中的。

# AWS 托管策略： AmazonSageMakerHyperPodObservabilityAdminAccess
<a name="security-iam-awsmanpol-AmazonSageMakerHyperPodObservabilityAdminAccess"></a>

该策略提供设置 Amazon 可 SageMaker HyperPod观察性所需的管理权限。它允许访问 Amazon Managed Service for Prometheus、Amazon Managed Grafana 和 Amazon Elastic Kubernetes Service 加载项。该政策还包括通过您账户中的所有亚马逊托管 Grafana 工作空间广泛访问 Grafana APIs HTTP ServiceAccountTokens 。

**权限详细信息**  
以下列表概述了该策略中包含的权限。
+ `prometheus` – 创建和管理 Amazon Managed Service for Prometheus 工作区和规则组
+ `grafana` – 创建和管理 Amazon Managed Grafana 工作区和服务账户
+ `eks` – 创建和管理 `amazon-sagemaker-hyperpod-observability` Amazon EKS 加载项
+ `iam` – 将特定的 IAM 服务角色传递给 Amazon Managed Grafana 和 Amazon EKS
+ `sagemaker`— 列出并描述 SageMaker HyperPod 集群
+ `sso` – 针对 Amazon Managed Grafana 设置创建和管理 IAM Identity Center 应用程序实例
+ `tag` – 标记 Amazon Managed Service for Prometheus、Amazon Managed Grafana 和 Amazon EKS 加载项资源

要查看策略 JSON，请参阅[AmazonSageMakerHyperPodObservabilityAdminAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonSageMakerHyperPodObservabilityAdminAccess.html)。

# AWS 托管策略： AmazonSageMakerHyperPodServiceRolePolicy
<a name="security-iam-awsmanpol-AmazonSageMakerHyperPodServiceRolePolicy"></a>

SageMaker HyperPod 创建并使用名为的服务相关角色`AWSServiceRoleForSageMakerHyperPod`，并`AmazonSageMakerHyperPodServiceRolePolicy`附加到该角色。该政策授予亚马逊使用相关 AWS 服务（例如亚马逊 EKS 和亚马逊）的 SageMaker HyperPod 权限 CloudWatch。

服务相关角色使设置变得 SageMaker HyperPod 更加容易，因为您不必手动添加必要的权限。 SageMaker HyperPod 定义其服务相关角色的权限，除非另有定义，否则 SageMaker HyperPod 只能担任其角色。定义的权限包括信任策略和权限策略，以及不能附加到任何其他 IAM 实体的权限策略。

只有在首先删除相关资源后，您才能删除服务关联角色。这样可以保护您的 SageMaker HyperPod 资源，因为您不会无意中删除访问资源的权限。

有关支持服务相关角色的其他服务的信息，请参阅与 [IAM 配合使用的AWS 服务，](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html)并在**服务相关角色**列中查找标有 “**是**” 的服务。选择**是**和链接，查看该服务的服务关联角色文档。

`AmazonSageMakerHyperPodServiceRolePolicy` SageMaker HyperPod 允许您代表您对指定资源完成以下操作。

**权限详细信息**

该服务关联角色策略包括以下权限。
+ `eks`：允许主体读取 Amazon Elastic Kubernetes（EKS）集群信息。
+ `logs`— 允许委托人将 Amazon CloudWatch 日志流发布到。`/aws/sagemaker/Clusters`

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "EKSClusterDescribePermissions",
      "Effect": "Allow",
      "Action": "eks:DescribeCluster",
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "CloudWatchLogGroupPermissions",
      "Effect": "Allow",
      "Action": [
        "logs:CreateLogGroup"
      ],
      "Resource": "arn:aws:logs:*:*:log-group:/aws/sagemaker/Clusters/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "CloudWatchLogStreamPermissions",
      "Effect": "Allow",
      "Action": [
        "logs:CreateLogStream",
        "logs:PutLogEvents"
      ],
      "Resource": "arn:aws:logs:*:*:log-group:/aws/sagemaker/Clusters/*:log-stream:*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    }
  ]
}
```

------

您必须配置使用户、组或角色能够创建、编辑或删除服务相关角色的权限。有关更多信息，请参阅*《IAM 用户指南》*中的[服务相关角色权限](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#service-linked-role-permissions)。

## 为创建服务相关角色 SageMaker HyperPod
<a name="create-slr"></a>

您无需手动创建服务关联角色。当您使用 SageMaker AI 控制台创建 SageMaker HyperPod集群时 AWS CLI，或将 AWS SDKs为您 SageMaker HyperPod 创建服务相关角色。

如果您删除了此服务相关角色但需要重新创建，则可以使用相同的流程（创建新 SageMaker HyperPod 集群）在您的账户中重新创建该角色。

## 编辑的服务相关角色 SageMaker HyperPod
<a name="edit-slr"></a>

SageMaker HyperPod 不允许您编辑`AWSServiceRoleForSageMakerHyperPod`服务相关角色。创建服务关联角色后，您将无法更改角色的名称，因为可能有多种实体引用该角色。但是可以使用 IAM 编辑角色描述。有关更多信息，请参阅《IAM 用户指南》**中的[编辑服务关联角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#edit-service-linked-role)。

## 删除的服务相关角色 SageMaker HyperPod
<a name="delete-slr"></a>

如果不再需要使用某个需要服务关联角色的功能或服务，我们建议您删除该角色。这样就没有未被主动监控或维护的未使用实体。但是，必须先清除服务相关角色的资源，然后才能手动删除它。

**使用服务相关角色删除 SageMaker HyperPod 群集资源**

使用以下选项之一删除 SageMaker HyperPod 群集资源。
+ 使用 SageMaker AI 控制台@@ [删除 SageMaker HyperPod 集群](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-operate-slurm-console-ui.html#sagemaker-hyperpod-operate-slurm-console-ui-delete-cluster)
+ 使用@@ [删除 SageMaker HyperPod 集群](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-operate-slurm-cli-command.html#sagemaker-hyperpod-operate-slurm-cli-command-delete-cluster) AWS CLI

**注意**  
如果您尝试删除资源时 SageMaker HyperPod 服务正在使用该角色，则删除可能会失败。如果发生这种情况，请等待几分钟后重试。

**使用 IAM 手动删除服务关联角色**

使用 IAM 控制台 AWS CLI、或 AWS API 删除`AWSServiceRoleForSageMakerHyperPod`服务相关角色。有关更多信息，请参阅《IAM 用户指南》**中的[删除服务关联角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#delete-service-linked-role)。

## SageMaker HyperPod 服务相关角色支持的区域
<a name="slr-regions"></a>

SageMaker HyperPod 支持在提供服务的所有区域中使用服务相关角色。有关更多信息，请参阅[的先决条件 SageMaker HyperPod](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-prerequisites.html)。

# AWS 托管策略： AmazonSageMakerClusterInstanceRolePolicy
<a name="security-iam-awsmanpol-AmazonSageMakerClusterInstanceRolePolicy"></a>

该政策授予使用Amazon通常所需的权限 SageMaker HyperPod。

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `cloudwatch`— 允许委托人发布 Amazon CloudWatch 指标。
+ `logs`— 允许委托人发布 CloudWatch 日志流。
+ `s3`：允许主体从您账户中的 Amazon S3 存储桶中列出并检索生命周期脚本文件。这些存储桶仅限于名称以“sagemaker-”开头的存储桶。
+ `ssmmessages`：允许主体打开与 AWS Systems Manager的连接。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement" : [
    {
      "Sid" : "CloudwatchLogStreamPublishPermissions",
      "Effect" : "Allow",
      "Action" : [
        "logs:PutLogEvents",
        "logs:CreateLogStream",
        "logs:DescribeLogStreams"
      ],
      "Resource" : [
        "arn:aws:logs:*:*:log-group:/aws/sagemaker/Clusters/*:log-stream:*"
      ]
    },
    {
      "Sid" : "CloudwatchLogGroupCreationPermissions",
      "Effect" : "Allow",
      "Action" : [
        "logs:CreateLogGroup"
      ],
      "Resource" : [
        "arn:aws:logs:*:*:log-group:/aws/sagemaker/Clusters/*"
      ]
    },
    {
      "Sid" : "CloudwatchPutMetricDataAccess",
      "Effect" : "Allow",
      "Action" : [
        "cloudwatch:PutMetricData"
      ],
      "Resource" : [
        "*"
      ],
      "Condition" : {
        "StringEquals" : {
          "cloudwatch:namespace" : "/aws/sagemaker/Clusters"
        }
      }
    },
    {
      "Sid" : "DataRetrievalFromS3BucketPermissions",
      "Effect" : "Allow",
      "Action" : [
        "s3:ListBucket",
        "s3:GetObject"
      ],
      "Resource" : [
        "arn:aws:s3:::sagemaker-*"
      ],
      "Condition" : {
        "StringEquals" : {
          "aws:ResourceAccount" : "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid" : "SSMConnectivityPermissions",
      "Effect" : "Allow",
      "Action" : [
        "ssmmessages:CreateControlChannel",
        "ssmmessages:CreateDataChannel",
        "ssmmessages:OpenControlChannel",
        "ssmmessages:OpenDataChannel"
      ],
      "Resource" : "*"
    }
  ]
}
```

------

## 亚马逊 SageMaker AI 更新了 SageMaker HyperPod 托管策略
<a name="security-iam-awsmanpol-hyperpod-updates"></a>

查看 SageMaker HyperPod 自该服务开始跟踪这些更改以来 AWS 托管策略更新的详细信息。要获得有关此页面变更的自动提醒，请订阅 SageMaker AI [文档历史记录页面上的 RSS 提要。](doc-history.md)


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
|  [AmazonSageMakerHyperPodTrainingOperatorAccess](security-iam-awsmanpol-AmazonSageMakerHyperPodTrainingOperatorAccess.md)：新策略  | 1 |  初始策略  | 2025 年 8 月 22 日 | 
|  [AmazonSageMakerHyperPodObservabilityAdminAccess](security-iam-awsmanpol-AmazonSageMakerHyperPodObservabilityAdminAccess.md)：更新策略  | 2 |  更新了策略，将角色范围缩小至固定值以包含 `service-role` 前缀。还添加了 end-to-end管理操作所需的`eks:DeletePodIdentityAssociation`和`eks:UpdatePodIdentityAssociation`权限。  | 2025 年 8 月 19 日 | 
|  [AmazonSageMakerHyperPodObservabilityAdminAccess](security-iam-awsmanpol-AmazonSageMakerHyperPodObservabilityAdminAccess.md)：新策略  | 1 |  初始策略  | 2025 年 7 月 10 日 | 
|  [AmazonSageMakerHyperPodServiceRolePolicy](security-iam-awsmanpol-AmazonSageMakerHyperPodServiceRolePolicy.md)：新策略  | 1 |  初始策略  | 2024 年 9 月 9 日 | 
|  [AmazonSageMakerClusterInstanceRolePolicy](security-iam-awsmanpol-AmazonSageMakerClusterInstanceRolePolicy.md)：新策略  | 1 |  初始策略  | 2023 年 11 月 29 日 | 

# AWS 用于 SageMaker AI 模型治理的托管策略
<a name="security-iam-awsmanpol-governance"></a>

此 AWS 托管策略添加了使用 A SageMaker I 模型治理所需的权限。该策略可在您的 AWS 账户中使用，并由从 SageMaker AI 控制台创建的执行角色使用。

**Topics**
+ [AWS 托管策略： AmazonSageMakerModelGovernanceUseAccess](#security-iam-awsmanpol-governance-AmazonSageMakerModelGovernanceUseAccess)
+ [Amazon SageMaker AI 更新了 SageMaker 人工智能模型治理托管策略](#security-iam-awsmanpol-governance-updates)

## AWS 托管策略： AmazonSageMakerModelGovernanceUseAccess
<a name="security-iam-awsmanpol-governance-AmazonSageMakerModelGovernanceUseAccess"></a>

该 AWS 托管策略授予使用所有 Amazon A SageMaker I Governance 功能所需的权限。该政策可在您的 AWS 账户中使用。

该策略包含以下权限。
+ `s3` - 从 Amazon S3 存储桶中检索对象。可检索的对象仅限于名称（不区分大小写）包含字符串 `"sagemaker"` 的对象。
+ `kms`— 列出用于内容加密的 AWS KMS 密钥。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "AllowSMMonitoringModelCards",
            "Effect": "Allow",
            "Action": [
                "sagemaker:ListMonitoringAlerts",
                "sagemaker:ListMonitoringExecutions",
                "sagemaker:UpdateMonitoringAlert",
                "sagemaker:StartMonitoringSchedule",
                "sagemaker:StopMonitoringSchedule",
                "sagemaker:ListMonitoringAlertHistory",
                "sagemaker:DescribeModelPackage",
                "sagemaker:DescribeModelPackageGroup",
                "sagemaker:CreateModelCard",
                "sagemaker:DescribeModelCard",
                "sagemaker:UpdateModelCard",
                "sagemaker:DeleteModelCard",
                "sagemaker:ListModelCards",
                "sagemaker:ListModelCardVersions",
                "sagemaker:CreateModelCardExportJob",
                "sagemaker:DescribeModelCardExportJob",
                "sagemaker:ListModelCardExportJobs"
            ],
            "Resource": "*"
        },
        {
            "Sid": "AllowSMTrainingModelsSearchTags",
            "Effect": "Allow",
            "Action": [
                "sagemaker:ListTrainingJobs",
                "sagemaker:DescribeTrainingJob",
                "sagemaker:ListModels",
                "sagemaker:DescribeModel",
                "sagemaker:Search",     
                "sagemaker:AddTags",
                "sagemaker:DeleteTags",
                "sagemaker:ListTags"
            ],
            "Resource": "*"
        },
        {
            "Sid": "AllowKMSActions",
            "Effect": "Allow",
            "Action": [
                "kms:ListAliases"
            ],
            "Resource": "*"
        },
        {
            "Sid": "AllowS3Actions",
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:CreateBucket",
                "s3:GetBucketLocation"
            ],
            "Resource": [
                "arn:aws:s3:::*SageMaker*",
                "arn:aws:s3:::*Sagemaker*",
                "arn:aws:s3:::*sagemaker*"
            ]
        },
        {
            "Sid": "AllowS3ListActions",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:ListAllMyBuckets"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## Amazon SageMaker AI 更新了 SageMaker 人工智能模型治理托管策略
<a name="security-iam-awsmanpol-governance-updates"></a>

查看有关自该服务开始跟踪 SageMaker AI 模型治理 AWS 托管策略变更以来这些更新的详细信息。要获得有关此页面变更的自动提醒，请订阅 SageMaker AI [文档历史记录页面上的 RSS 提要。](doc-history.md)


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
|  [AmazonSageMakerModelGovernanceUseAccess](#security-iam-awsmanpol-governance-AmazonSageMakerModelGovernanceUseAccess) – 对现有策略的更新   | 3 |  添加语句 IDs (`Sid`)。  | 2024 年 6 月 4 日 | 
| AmazonSageMakerModelGovernanceUseAccess -更新现有政策 | 2 |  添加 `sagemaker:DescribeModelPackage` 和 `DescribeModelPackageGroup` 权限。  | 2023 年 7 月 17 日 | 
| AmazonSageMakerModelGovernanceUseAccess -新政策 | 1 | 初始策略 | 2022 年 11 月 30 日 | 

# AWS 模型注册管理机构的托管策略
<a name="security-iam-awsmanpol-model-registry"></a>

这些 AWS 托管策略增加了使用模型注册表所需的权限。这些策略可在您的 AWS 账户中使用，并由从 Amazon A SageMaker I 控制台创建的执行角色使用。

**Topics**
+ [AWS 托管策略： AmazonSageMakerModelRegistryFullAccess](#security-iam-awsmanpol-model-registry-AmazonSageMakerModelRegistryFullAccess)
+ [Amazon SageMaker AI 更新了《模型注册表》托管政策](#security-iam-awsmanpol-model-registry-updates)

## AWS 托管策略： AmazonSageMakerModelRegistryFullAccess
<a name="security-iam-awsmanpol-model-registry-AmazonSageMakerModelRegistryFullAccess"></a>

此 AWS 托管策略授予使用 Amazon A SageMaker I 域内所有模型注册表功能所需的权限。配置模型注册表设置以启用模型注册表权限时，此策略会附加到执行角色中。

该策略包含以下权限。
+ `ecr` - 允许主体检索有关 Amazon Elastic Container Registry (Amazon ECR) 映像的信息，包括元数据。
+ `iam`— 允许委托人将执行角色传递给 Amazon A SageMaker I 服务。
+ `resource-groups`— 允许委托人创建、列出、标记和删除 AWS Resource Groups。
+ `s3` - 允许主体从存储模型版本的 Amazon Simple Storage Service (Amazon S3) 存储桶中检索对象。可检索的对象仅限于名称（不区分大小写）包含字符串 `"sagemaker"` 的对象。
+ `sagemaker`— 允许委托人使用模型注册表对模型进行编目、管理和部署。 SageMaker 
+ `kms`— 仅允许 SageMaker AI 服务主体添加授权、生成数据密钥、解密和读取密 AWS KMS 钥，并且仅允许标记为 “sagemaker” 使用的密钥。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "AmazonSageMakerModelRegistrySageMakerReadPermission",
      "Effect": "Allow",
      "Action": [
        "sagemaker:DescribeAction",
        "sagemaker:DescribeInferenceRecommendationsJob",
        "sagemaker:DescribeModelPackage",
        "sagemaker:DescribeModelPackageGroup",
        "sagemaker:DescribePipeline",
        "sagemaker:DescribePipelineExecution",
        "sagemaker:ListAssociations",
        "sagemaker:ListArtifacts",
        "sagemaker:ListModelMetadata",
        "sagemaker:ListModelPackages",
        "sagemaker:Search",
        "sagemaker:GetSearchSuggestions"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AmazonSageMakerModelRegistrySageMakerWritePermission",
      "Effect": "Allow",
      "Action": [
        "sagemaker:AddTags",
        "sagemaker:CreateModel",
        "sagemaker:CreateModelPackage",
        "sagemaker:CreateModelPackageGroup",
        "sagemaker:CreateEndpoint",
        "sagemaker:CreateEndpointConfig",
        "sagemaker:CreateInferenceRecommendationsJob",
        "sagemaker:DeleteModelPackage",
        "sagemaker:DeleteModelPackageGroup",
        "sagemaker:DeleteTags",
        "sagemaker:UpdateModelPackage"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AmazonSageMakerModelRegistryS3GetPermission",
      "Effect": "Allow",
      "Action": [
        "s3:GetObject"
      ],
      "Resource": [
        "arn:aws:s3:::*SageMaker*",
        "arn:aws:s3:::*Sagemaker*",
        "arn:aws:s3:::*sagemaker*"
      ]
    },
    {
      "Sid": "AmazonSageMakerModelRegistryS3ListPermission",
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket",
        "s3:ListAllMyBuckets"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AmazonSageMakerModelRegistryECRReadPermission",
      "Effect": "Allow",
      "Action": [
        "ecr:BatchGetImage",
        "ecr:DescribeImages"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AmazonSageMakerModelRegistryIAMPassRolePermission",
      "Effect": "Allow",
      "Action": [
        "iam:PassRole"
      ],
      "Resource": "arn:aws:iam::*:role/*",
      "Condition": {
        "StringEquals": {
          "iam:PassedToService": "sagemaker.amazonaws.com"
        }
      }
    },
    {
      "Sid": "AmazonSageMakerModelRegistryTagReadPermission",
      "Effect": "Allow",
      "Action": [
        "tag:GetResources"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AmazonSageMakerModelRegistryResourceGroupGetPermission",
      "Effect": "Allow",
      "Action": [
        "resource-groups:GetGroupQuery"
      ],
      "Resource": "arn:aws:resource-groups:*:*:group/*"
    },
    {
      "Sid": "AmazonSageMakerModelRegistryResourceGroupListPermission",
      "Effect": "Allow",
      "Action": [
        "resource-groups:ListGroupResources"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AmazonSageMakerModelRegistryResourceGroupWritePermission",
      "Effect": "Allow",
      "Action": [
        "resource-groups:CreateGroup",
        "resource-groups:Tag"
      ],
      "Resource": "arn:aws:resource-groups:*:*:group/*",
      "Condition": {
        "ForAnyValue:StringEquals": {
          "aws:TagKeys": "sagemaker:collection"
        }
      }
    },
    {
      "Sid": "AmazonSageMakerModelRegistryResourceGroupDeletePermission",
      "Effect": "Allow",
      "Action": "resource-groups:DeleteGroup",
      "Resource": "arn:aws:resource-groups:*:*:group/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceTag/sagemaker:collection": "true"
        }
      }
    },
    {
      "Sid": "AmazonSageMakerModelRegistryResourceKMSPermission",
      "Effect": "Allow",
      "Action": [
        "kms:CreateGrant",
        "kms:DescribeKey",
        "kms:GenerateDataKey",
        "kms:Decrypt"
      ],
      "Resource": "arn:aws:kms:*:*:key/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceTag/sagemaker" : "true"
        },
        "StringLike": {
          "kms:ViaService": "sagemaker.*.amazonaws.com"
        }
      }
    }
  ]
}
```

------

## Amazon SageMaker AI 更新了《模型注册表》托管政策
<a name="security-iam-awsmanpol-model-registry-updates"></a>

查看自该服务开始跟踪模型注册 AWS 管理机构托管策略更新以来，有关这些更新的详细信息。要获得有关此页面变更的自动提醒，请订阅 SageMaker AI [文档历史记录页面上的 RSS 提要。](doc-history.md)


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
|  [AmazonSageMakerModelRegistryFullAccess](#security-iam-awsmanpol-model-registry-AmazonSageMakerModelRegistryFullAccess) – 对现有策略的更新 | 2 |  添加 `kms:CreateGrant`、`kms:DescribeKey`、`kms:GenerateDataKey` 和 `kms:Decrypt` 权限。  | 2024 年 6 月 6 日 | 
| AmazonSageMakerModelRegistryFullAccess -新政策 | 1 |  初始策略  | 2023 年 4 月 12 日 | 

# AWS SageMaker 笔记本电脑的托管策略
<a name="security-iam-awsmanpol-notebooks"></a>

这些 AWS 托管策略增加了使用 SageMaker 笔记本所需的权限。这些策略可在您的 AWS 账户中使用，并由从 SageMaker AI 控制台创建的执行角色使用。

**Topics**
+ [AWS 托管策略： AmazonSageMakerNotebooksServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerNotebooksServiceRolePolicy)
+ [Amazon SageMaker AI 更新了 SageMaker AI Notebook 托管政策](#security-iam-awsmanpol-notebooks-updates)

## AWS 托管策略： AmazonSageMakerNotebooksServiceRolePolicy
<a name="security-iam-awsmanpol-AmazonSageMakerNotebooksServiceRolePolicy"></a>

该 AWS 托管政策授予使用亚马逊 SageMaker 笔记本通常所需的权限。该政策将添加到您加入 Amazon SageMaker Studio Classic 时创建的策略中。`AWSServiceRoleForAmazonSageMakerNotebooks`有关服务相关角色的更多信息，请参阅[服务关联角色](security_iam_service-with-iam.md#security_iam_service-with-iam-roles-service-linked)。有关更多信息，请参阅 [AmazonSageMakerNotebooksServiceRolePolicy](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonSageMakerNotebooksServiceRolePolicy.html)。

**权限详细信息**

该策略包含以下权限。
+ `elasticfilesystem` - 允许主体创建和删除 Amazon Elastic File System (EFS) 文件系统、接入点和挂载目标。这些仅限于那些标有钥匙的人*ManagedByAmazonSageMakerResource*。允许主体描述所有 EFS 文件系统、接入点和挂载目标。允许主体为 EFS 接入点和挂载目标创建或覆盖标签。
+ `ec2` - 允许主体为 Amazon Elastic Compute Cloud (EC2) 实例创建网络接口和安全组。还允许主体为这些资源创建和覆盖标签。
+ `sso` - 允许主体向 AWS IAM Identity Center添加以及从中删除托管的应用程序实例。
+ `sagemaker`— 允许委托人创建和读取 SageMaker AI 用户配置文件和 SageMaker AI 空间；删除 SageMaker AI 空间和 SageMaker AI 应用程序；以及添加和列出标签。
+ `fsx`— 允许委托人描述 Amazon f FSx or Lustre 文件系统，并使用元数据将其挂载到笔记本上。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {   
            "Sid": "AllowFSxDescribe",
            "Effect": "Allow",
            "Action": [
                "fsx:DescribeFileSystems"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "AllowSageMakerDeleteApp",
            "Effect": "Allow",
            "Action": [
                "sagemaker:DeleteApp"
            ],
            "Resource": "arn:aws:sagemaker:*:*:app/*"
        },
        {
            "Sid": "AllowEFSAccessPointCreation",
            "Effect": "Allow",
            "Action": "elasticfilesystem:CreateAccessPoint",
            "Resource": "arn:aws:elasticfilesystem:*:*:file-system/*",
            "Condition": {
                "StringLike": {
                    "aws:ResourceTag/ManagedByAmazonSageMakerResource": "*",
                    "aws:RequestTag/ManagedByAmazonSageMakerResource": "*"
                }
            }
        },
        {
            "Sid": "AllowEFSAccessPointDeletion",
            "Effect": "Allow",
            "Action": [
                "elasticfilesystem:DeleteAccessPoint"
            ],
            "Resource": "arn:aws:elasticfilesystem:*:*:access-point/*",
            "Condition": {
                "StringLike": {
                    "aws:ResourceTag/ManagedByAmazonSageMakerResource": "*"
                }
            }
        },
        {
            "Sid": "AllowEFSCreation",
            "Effect": "Allow",
            "Action": "elasticfilesystem:CreateFileSystem",
            "Resource": "*",
            "Condition": {
                "StringLike": {
                    "aws:RequestTag/ManagedByAmazonSageMakerResource": "*"
                }
            }
        },
        {
            "Sid": "AllowEFSMountWithDeletion",
            "Effect": "Allow",
            "Action": [
                "elasticfilesystem:CreateMountTarget",
                "elasticfilesystem:DeleteFileSystem",
                "elasticfilesystem:DeleteMountTarget"
            ],
            "Resource": "*",
            "Condition": {
                "StringLike": {
                    "aws:ResourceTag/ManagedByAmazonSageMakerResource": "*"
                }
            }
        },
        {
            "Sid": "AllowEFSDescribe",
            "Effect": "Allow",
            "Action": [
                "elasticfilesystem:DescribeAccessPoints",
                "elasticfilesystem:DescribeFileSystems",
                "elasticfilesystem:DescribeMountTargets"
            ],
            "Resource": "*"
        },
        {
            "Sid": "AllowEFSTagging",
            "Effect": "Allow",
            "Action": "elasticfilesystem:TagResource",
            "Resource": [
                "arn:aws:elasticfilesystem:*:*:access-point/*",
                "arn:aws:elasticfilesystem:*:*:file-system/*"
            ],
            "Condition": {
                "StringLike": {
                    "aws:ResourceTag/ManagedByAmazonSageMakerResource": "*"
                }
            }
        },
        {
            "Sid": "AllowEC2Tagging",
            "Effect": "Allow",
            "Action": "ec2:CreateTags",
            "Resource": [
                "arn:aws:ec2:*:*:network-interface/*",
                "arn:aws:ec2:*:*:security-group/*"
            ]
        },
        {
            "Sid": "AllowEC2Operations",
            "Effect": "Allow",
            "Action": [
                "ec2:CreateNetworkInterface",
                "ec2:CreateSecurityGroup",
                "ec2:DeleteNetworkInterface",
                "ec2:DescribeDhcpOptions",
                "ec2:DescribeNetworkInterfaces",
                "ec2:DescribeSecurityGroups",
                "ec2:DescribeSubnets",
                "ec2:DescribeVpcs",
                "ec2:ModifyNetworkInterfaceAttribute"
            ],
            "Resource": "*"
        },
        {
            "Sid": "AllowEC2AuthZ",
            "Effect": "Allow",
            "Action": [
                "ec2:AuthorizeSecurityGroupEgress",
                "ec2:AuthorizeSecurityGroupIngress",
                "ec2:CreateNetworkInterfacePermission",
                "ec2:DeleteNetworkInterfacePermission",
                "ec2:DeleteSecurityGroup",
                "ec2:RevokeSecurityGroupEgress",
                "ec2:RevokeSecurityGroupIngress"
            ],
            "Resource": "*",
            "Condition": {
                "StringLike": {
                    "ec2:ResourceTag/ManagedByAmazonSageMakerResource": "*"
                }
            }
        },
        {
            "Sid": "AllowIdcOperations",
            "Effect": "Allow",
            "Action": [
                "sso:CreateManagedApplicationInstance",
                "sso:DeleteManagedApplicationInstance",
                "sso:GetManagedApplicationInstance"
            ],
            "Resource": "*"
        },
        {
            "Sid": "AllowSagemakerProfileCreation",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateUserProfile",
                "sagemaker:DescribeUserProfile"
            ],
            "Resource": "*"
        },
        {
            "Sid": "AllowSagemakerSpaceOperationsForCanvasManagedSpaces",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreateSpace",
                "sagemaker:DescribeSpace",
                "sagemaker:DeleteSpace",
                "sagemaker:ListTags"
            ],
            "Resource": "arn:aws:sagemaker:*:*:space/*/CanvasManagedSpace-*"
        },
        {
            "Sid": "AllowSagemakerAddTagsForAppManagedSpaces",
            "Effect": "Allow",
            "Action": [
                "sagemaker:AddTags"
            ],
            "Resource": "arn:aws:sagemaker:*:*:space/*/CanvasManagedSpace-*",
            "Condition": {
                "StringEquals": {
                    "sagemaker:TaggingAction": "CreateSpace"
                }
            }
        }
    ]
}
```

------

## Amazon SageMaker AI 更新了 SageMaker AI Notebook 托管政策
<a name="security-iam-awsmanpol-notebooks-updates"></a>

查看自该服务开始跟踪这些更改以来，Amazon SageMaker AI AWS 托管策略更新的详细信息。


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
|  [AmazonSageMakerNotebooksServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerNotebooksServiceRolePolicy) – 对现有策略的更新  | 10 |  添加 `fsx:DescribeFileSystems` 权限  | 2024 年 11 月 14 日 | 
|  [AmazonSageMakerNotebooksServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerNotebooksServiceRolePolicy) – 对现有策略的更新  | 9 |  添加 `sagemaker:DeleteApp` 权限  | 2024 年 7 月 24 日 | 
| AmazonSageMakerNotebooksServiceRolePolicy -更新现有政策 | 8 |  添加 `sagemaker:CreateSpace`、`sagemaker:DescribeSpace`、`sagemaker:DeleteSpace`、`sagemaker:ListTags` 和 `sagemaker:AddTags` 权限。  | 2024 年 5 月 22 日 | 
| AmazonSageMakerNotebooksServiceRolePolicy -更新现有政策 | 7 |  添加 `elasticfilesystem:TagResource` 权限  | 2023 年 3 月 9 日 | 
| AmazonSageMakerNotebooksServiceRolePolicy -更新现有政策 | 6 |  添加 `elasticfilesystem:CreateAccessPoint`、`elasticfilesystem:DeleteAccessPoint` 和 `elasticfilesystem:DescribeAccessPoints` 权限。  | 2023 年 1 月 12 日 | 
|  |  |  SageMaker AI 开始跟踪其 AWS 托管策略的更改。  | 2021 年 6 月 1 日 | 

# AWS Amazon SageMaker 合作伙伴 AI 应用程序的托管政策
<a name="security-iam-awsmanpol-partner-apps"></a>

这些 AWS 托管政策增加了使用亚马逊 SageMaker 合作伙伴 AI 应用程序所需的权限。这些策略可在您的 AWS 账户中使用，并由从 SageMaker AI 控制台创建的执行角色使用。

**Topics**
+ [AWS 托管策略： AmazonSageMakerPartnerAppsFullAccess](#security-iam-awsmanpol-AmazonSageMakerPartnerAppsFullAccess)
+ [Amazon SageMaker AI 更新了合作伙伴 AI 应用程序托管政策](#security-iam-awsmanpol-partner-apps-updates)

## AWS 托管策略： AmazonSageMakerPartnerAppsFullAccess
<a name="security-iam-awsmanpol-AmazonSageMakerPartnerAppsFullAccess"></a>

允许对 Amazon SageMaker 合作伙伴 AI 应用程序进行完全管理访问。

**权限详细信息**

此 AWS 托管策略包括以下权限。
+ `sagemaker`— 授予亚马逊 SageMaker 合作伙伴 AI 应用程序用户访问应用程序、列出可用应用程序、启动应用程序 Web UIs 以及使用应用程序 SDK 进行连接的权限。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "AmazonSageMakerPartnerListAppsPermission",
            "Effect": "Allow",
            "Action": "sagemaker:ListPartnerApps",
            "Resource": "*"
        },
        {
            "Sid": "AmazonSageMakerPartnerAppsPermission",
            "Effect": "Allow",
            "Action": [
                "sagemaker:CreatePartnerAppPresignedUrl",
                "sagemaker:DescribePartnerApp",
                "sagemaker:CallPartnerAppApi"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            },
            "Resource": "arn:aws:sagemaker:*:*:partner-app/*"
        }
    ]
}
```

------

## Amazon SageMaker AI 更新了合作伙伴 AI 应用程序托管政策
<a name="security-iam-awsmanpol-partner-apps-updates"></a>

查看自该服务开始跟踪这些变更以来，Partner AI Apps AWS 托管政策更新的详细信息。要获得有关此页面变更的自动提醒，请订阅 SageMaker AI [文档历史记录页面上的 RSS 提要。](doc-history.md)


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
| AmazonSageMakerPartnerAppsFullAccess -新政策 | 1 |  初始策略  | 2025 年 1 月 17 日 | 

# AWS 管 SageMaker 道的托管策略
<a name="security-iam-awsmanpol-pipelines"></a>

这些 AWS 托管策略添加了使用 SageMaker 管道所需的权限。这些策略可在您的 AWS 账户中使用，并由从 SageMaker AI 控制台创建的执行角色使用。

**Topics**
+ [AWS 托管策略： AmazonSageMakerPipelinesIntegrations](#security-iam-awsmanpol-AmazonSageMakerPipelinesIntegrations)
+ [Amazon SageMaker AI 更新了 SageMaker AI Pipelines 托管策略](#security-iam-awsmanpol-pipelines-updates)

## AWS 托管策略： AmazonSageMakerPipelinesIntegrations
<a name="security-iam-awsmanpol-AmazonSageMakerPipelinesIntegrations"></a>

此 AWS 托管策略授予在管道中 SageMaker 使用回调步骤和 Lambda 步骤通常所需的权限。该政策将添加到您加入 Amazon SageMaker Studio Classic 时创建的策略中。`AmazonSageMaker-ExecutionRole`此策略可以附加到用于创作或执行管道的任何角色。

该策略授予构建调用 AWS Lambda 函数或包含回调步骤的管道时所需的相应的 Lambda、 EventBridge亚马逊简单队列服务 (Amazon SQS)、Amazon 和 IAM 权限，这些权限可用于手动批准步骤或运行自定义工作负载。

Amazon SQS 权限允许您创建接收回调消息所需的 Amazon SQS 队列，也可以向该队列发送消息。

Lambda 权限允许您创建、读取、更新和删除管道步骤中使用的 Lambda 函数，也可以调用这些 Lambda 函数。

此策略授予运行管道 Amazon EMR 步骤所需的 Amazon EMR 权限。

**权限详细信息**

该策略包含以下权限。
+ `elasticmapreduce` - 读取、添加和取消正在运行的 Amazon EMR 集群中的步骤。读取、创建和终止新的 Amazon EMR 集群。
+ `events`— 读取、创建、更新目标并将其添加到名为`SageMakerPipelineExecutionEMRStepStatusUpdateRule`和的 EventBridge 规则中`SageMakerPipelineExecutionEMRClusterStatusUpdateRule`。
+ `iam`— 将 IAM 角色传递给 AWS Lambda 服务、亚马逊 EMR 和亚马逊 EC2。
+ `lambda` - 创建、读取、更新、删除和调用 Lambda 函数。这些权限仅限于名称包含“sagemaker”的函数。
+ `sqs` - 创建 Amazon SQS 队列；发送 Amazon SQS 消息。这些权限仅限于名称包含“sagemaker”的队列。

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "lambda:CreateFunction",
                "lambda:DeleteFunction",
                "lambda:GetFunction",
                "lambda:InvokeFunction",
                "lambda:UpdateFunctionCode"
            ],
            "Resource": [
                "arn:aws:lambda:*:*:function:*sagemaker*",
                "arn:aws:lambda:*:*:function:*sageMaker*",
                "arn:aws:lambda:*:*:function:*SageMaker*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "sqs:CreateQueue",
                "sqs:SendMessage"
            ],
            "Resource": [
                "arn:aws:sqs:*:*:*sagemaker*",
                "arn:aws:sqs:*:*:*sageMaker*",
                "arn:aws:sqs:*:*:*SageMaker*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "iam:PassRole"
            ],
            "Resource": "arn:aws:iam::*:role/*",
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": [
                        "lambda.amazonaws.com",
                        "elasticmapreduce.amazonaws.com",
                        "ec2.amazonaws.com"
                    ]
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "events:DescribeRule",
                "events:PutRule",
                "events:PutTargets"
            ],
            "Resource": [
                "arn:aws:events:*:*:rule/SageMakerPipelineExecutionEMRStepStatusUpdateRule",
                "arn:aws:events:*:*:rule/SageMakerPipelineExecutionEMRClusterStatusUpdateRule"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "elasticmapreduce:AddJobFlowSteps",
                "elasticmapreduce:CancelSteps",
                "elasticmapreduce:DescribeStep",
                "elasticmapreduce:RunJobFlow",
                "elasticmapreduce:DescribeCluster",
                "elasticmapreduce:TerminateJobFlows",
                "elasticmapreduce:ListSteps"
            ],
            "Resource": [
                "arn:aws:elasticmapreduce:*:*:cluster/*"
            ]
        }
    ]
}
```

------

## Amazon SageMaker AI 更新了 SageMaker AI Pipelines 托管策略
<a name="security-iam-awsmanpol-pipelines-updates"></a>

查看自该服务开始跟踪这些更改以来，Amazon SageMaker AI AWS 托管策略更新的详细信息。


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
|  [AmazonSageMakerPipelinesIntegrations](#security-iam-awsmanpol-AmazonSageMakerPipelinesIntegrations) – 对现有策略的更新  | 3 |   添加了 `elasticmapreduce:RunJobFlows`、`elasticmapreduce:TerminateJobFlows`、`elasticmapreduce:ListSteps` 和 `elasticmapreduce:DescribeCluster` 的权限。  | 2023 年 2 月 17 日 | 
|  [AmazonSageMakerPipelinesIntegrations](#security-iam-awsmanpol-AmazonSageMakerPipelinesIntegrations) – 对现有策略的更新  | 2 |  添加了 `lambda:GetFunction`、`events:DescribeRule`、`events:PutRule`、`events:PutTargets`、`elasticmapreduce:AddJobFlowSteps`、`elasticmapreduce:CancelSteps` 和 `elasticmapreduce:DescribeStep` 的权限。  | 2022 年 4 月 20 日 | 
| AmazonSageMakerPipelinesIntegrations -新政策 | 1 |  初始策略  | 2021 年 7 月 30 日 | 

# AWS SageMaker 培训计划的托管策略
<a name="security-iam-awsmanpol-training-plan"></a>

 该 AWS 托管策略授予在 SageMaker 人工智能中创建和管理 Amazon SageMaker 培训计划和预留容量所需的权限。该策略可以附加到用于创建和管理训练计划的 IAM 角色以及 A SageMaker I 中的预留容量，包括您的 [SageMaker AI 执行角色](sagemaker-roles.md)。

**Topics**
+ [AWS 托管策略： AmazonSageMakerTrainingPlanCreateAccess](#security-iam-awsmanpol-AmazonSageMakerTrainingPlanCreateAccess)
+ [Amazon SageMaker AI 更新了 SageMaker 培训计划托管政策](#security-iam-awsmanpol-training-plan-updates)

## AWS 托管策略： AmazonSageMakerTrainingPlanCreateAccess
<a name="security-iam-awsmanpol-AmazonSageMakerTrainingPlanCreateAccess"></a>

此策略提供在 SageMaker AI 中创建、描述、搜索和列出训练计划的必要权限。此外，它还允许在特定条件下向训练计划和预留容量资源添加标签。

**权限详细信息**

该策略包含以下权限。
+ `sagemaker` – 创建训练计划和预留容量，允许在具体标记操作为 `CreateTrainingPlan` 或 `CreateReservedCapacity` 时向训练计划和预留容量添加标签，或者允许描述训练计划，允许搜索训练计划产品并列出所有资源的现有训练计划。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "CreateTrainingPlanPermissions",
      "Effect": "Allow",
      "Action": [
        "sagemaker:CreateTrainingPlan",
        "sagemaker:CreateReservedCapacity",
        "sagemaker:DescribeReservedCapacity"
      ],
      "Resource": [
        "arn:aws:sagemaker:*:*:training-plan/*",
        "arn:aws:sagemaker:*:*:reserved-capacity/*"
      ]
    },
    {
      "Sid": "AggTagsToTrainingPlanPermissions",
      "Effect": "Allow",
      "Action": [
        "sagemaker:AddTags"
      ],
      "Resource": [
        "arn:aws:sagemaker:*:*:training-plan/*",
        "arn:aws:sagemaker:*:*:reserved-capacity/*"
      ],
      "Condition": {
        "StringEquals": {
          "sagemaker:TaggingAction": ["CreateTrainingPlan","CreateReservedCapacity"]
        }
      }
    },
    {
      "Sid": "DescribeTrainingPlanPermissions",
      "Effect": "Allow",
      "Action": "sagemaker:DescribeTrainingPlan",
      "Resource": [
        "arn:aws:sagemaker:*:*:training-plan/*"
      ]
    },
    {
      "Sid": "NonResourceLevelTrainingPlanPermissions",
      "Effect": "Allow",
      "Action": [
        "sagemaker:SearchTrainingPlanOfferings",
        "sagemaker:ListTrainingPlans"
      ],
      "Resource": "*"
    },
    {
      "Sid": "ListUltraServersByReservedCapacityPermissions",
      "Effect": "Allow",
      "Action": "sagemaker:ListUltraServersByReservedCapacity",
      "Resource": [
      "arn:aws:sagemaker:*:*:reserved-capacity/*"
      ]
    }
  ]
}
```

------

## Amazon SageMaker AI 更新了 SageMaker 培训计划托管政策
<a name="security-iam-awsmanpol-training-plan-updates"></a>

查看自该服务开始跟踪这些更改以来，Amazon SageMaker AI AWS 托管策略更新的详细信息。


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
|  AmazonSageMakerTrainingPlanCreateAccess -更新了政策  | 2 | 更新了政策，增加了检索有关特定预留容量的信息并列出所有 UltraServers 预留容量的权限。 | 2024 年 7 月 29 日 | 
| AmazonSageMakerTrainingPlanCreateAccess -新政策 | 1 |  初始策略  | 2024 年 12 月 4 日 | 

# AWS SageMaker 项目管理策略和 JumpStart
<a name="security-iam-awsmanpol-sc"></a>

这些 AWS 托管策略增加了使用内置 Amazon A SageMaker I 项目模板和 JumpStart 解决方案的权限。这些策略可在您的 AWS 账户中使用，并由从 SageMaker AI 控制台创建的执行角色使用。

SageMaker 项目并 JumpStart 使用 S AWS ervice Catalog 在客户账户中配置 AWS 资源。一些创建的资源需要代入执行角色。例如，如果 S AWS ervice Catalog 代表客户为 SageMaker 人工智能机器学习 CI/CD 项目创建 CodePipeline 管道，则该管道需要一个 IAM 角色。

该[AmazonSageMakerServiceCatalogProductsLaunchRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsLaunchRole)角色具有从 S AWS ervice Catalog 中启动 SageMaker AI 产品组合所需的权限。该[AmazonSageMakerServiceCatalogProductsUseRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsUseRole)角色拥有使用 S AWS ervice Catalog 中的 SageMaker AI 产品组合所需的权限。该`AmazonSageMakerServiceCatalogProductsLaunchRole`角色将角色传递给预`AmazonSageMakerServiceCatalogProductsUseRole`配置的 S AWS ervice Catalog 产品资源。

**Topics**
+ [AWS 托管策略: AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy)
+ [AWS 托管策略： AmazonSageMakerPartnerServiceCatalogProductsApiGatewayServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerPartnerServiceCatalogProductsApiGatewayServiceRolePolicy)
+ [AWS 托管策略： AmazonSageMakerPartnerServiceCatalogProductsCloudFormationServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerPartnerServiceCatalogProductsCloudFormationServiceRolePolicy)
+ [AWS 托管策略： AmazonSageMakerPartnerServiceCatalogProductsLambdaServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerPartnerServiceCatalogProductsLambdaServiceRolePolicy)
+ [AWS 托管策略： AmazonSageMakerServiceCatalogProductsApiGatewayServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsApiGatewayServiceRolePolicy)
+ [AWS 托管策略： AmazonSageMakerServiceCatalogProductsCloudformationServiceRole策略](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsCloudformationServiceRolePolicy)
+ [AWS 托管策略： AmazonSageMakerServiceCatalogProductsCodeBuildServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsCodeBuildServiceRolePolicy)
+ [AWS 托管策略： AmazonSageMakerServiceCatalogProductsCodePipelineServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsCodePipelineServiceRolePolicy)
+ [AWS 托管策略： AmazonSageMakerServiceCatalogProductsEventsServiceRole策略](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsEventsServiceRolePolicy)
+ [AWS 托管策略： AmazonSageMakerServiceCatalogProductsFirehoseServiceRole策略](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsFirehoseServiceRolePolicy)
+ [AWS 托管策略： AmazonSageMakerServiceCatalogProductsGlueServiceRole策略](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsGlueServiceRolePolicy)
+ [AWS 托管策略： AmazonSageMakerServiceCatalogProductsLambdaServiceRole策略](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsLambdaServiceRolePolicy)
+ [Amazon SageMaker AI 更新了 S AWS ervice Catalog AWS 托管策略](#security-iam-awsmanpol-sc-updates)

## AWS 托管策略: AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy
<a name="security-iam-awsmanpol-AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy"></a>

该服务使用此服务角色策略来配置 Amazon A SageMaker I 产品组合中的产品。 AWS Service Catalog 该策略向一组相关 AWS 服务授予权限 AWS CodePipeline，包括、 AWS CodeBuild、 AWS CodeCommit AWS CloudFormation、 AWS Glue 等。

该`AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy`策略旨在由从 SageMaker AI 控制台创建的`AmazonSageMakerServiceCatalogProductsLaunchRole`角色使用。该策略为客户账户添加了为 SageMaker 项目配置 AWS 资源和 JumpStart 使用 Service Catalog 的权限。

**权限详细信息**

该策略包含以下权限。
+ `apigateway` - 允许角色调用标有 `sagemaker:launch-source` 的 API Gateway 端点。
+ `cloudformation`— AWS Service Catalog 允许创建、更新和删除 CloudFormation 堆栈。还允许服务目录标记和取消标记资源。
+ `codebuild`— 允许由担任 AWS Service Catalog 并传递 CloudFormation 给的角色创建、更新和删除 CodeBuild 项目。
+ `codecommit`— 允许由担任 AWS Service Catalog 并传递 CloudFormation 给的角色创建、更新和删除 CodeCommit 存储库。
+ `codepipeline`— 允许由担任 AWS Service Catalog 并传递 CloudFormation 给的角色创建、更新和删除 CodePipelines。
+ `codeconnections`，`codestar-connections`— 还允许角色传递 AWS CodeConnections 和 AWS CodeStar 连接。
+ `cognito-idp` - 允许角色创建、更新和删除组和用户池。也允许标记资源。
+ `ecr`— 允许由担任 AWS Service Catalog 并传递 CloudFormation 给的角色创建和删除 Amazon ECR 存储库。也允许标记资源。
+ `events`— 允许由担任 AWS Service Catalog 并传递 CloudFormation 给的角色创建和删除 EventBridge 规则。用于连接 CICD 管道的各个组件。
+ `firehose`：允许角色与 Firehose 流交互。
+ `glue`— 允许角色与之交互 AWS Glue。
+ `iam` - 允许角色传递前缀为 `AmazonSageMakerServiceCatalog` 的角色。当 Projects 预置 AWS Service Catalog 产品时，需要该权限，因为需要将角色传递给 AWS Service Catalog。
+ `lambda` - 允许角色与 AWS Lambda交互。也允许标记资源。
+ `logs` - 允许角色创建、删除和访问日志流。
+ `s3`— 允许由担任 AWS Service Catalog 并传递 CloudFormation 给的角色访问存储项目模板代码的 Amazon S3 存储桶。
+ `sagemaker`— 允许角色与各种 SageMaker AI 服务进行交互。这既可以在模板配置 CloudFormation 期间完成，也可以在CICD管道执行 CodeBuild 期间完成。也允许标记以下资源：端点、端点配置、模型、管道、项目和模型包。
+ `states` - 允许角色创建、删除和更新前缀为 `sagemaker` 的 Step Functions。

要查看此策略的权限，请参阅《 AWS 托管策略参考》ServiceCatalogProductsServiceRolePolicy中的 [AmazonSageMakerAdmin-](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy.html)。

## AWS 托管策略： AmazonSageMakerPartnerServiceCatalogProductsApiGatewayServiceRolePolicy
<a name="security-iam-awsmanpol-AmazonSageMakerPartnerServiceCatalogProductsApiGatewayServiceRolePolicy"></a>

亚马逊 API Gatew SageMaker ay 在亚马逊 AI 产品组合中的 AWS Service Catalog 预配置产品中使用此政策。该策略旨在附加到 IAM 角色，该角色将[AmazonSageMakerServiceCatalogProductsLaunchRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsLaunchRole)传递给由 API Gateway 创建的需要角色的 AWS 资源。

**权限详细信息**

该策略包含以下权限。
+ `lambda` - 调用由合作伙伴模板创建的函数。
+ `sagemaker` - 调用由合作伙伴模板创建的端点。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "lambda:InvokeFunction",
      "Resource": "arn:aws:lambda:*:*:function:sagemaker-*",
      "Condition": {
        "Null": {
          "aws:ResourceTag/sagemaker:project-name": "false",
          "aws:ResourceTag/sagemaker:partner": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": "sagemaker:InvokeEndpoint",
      "Resource": "arn:aws:sagemaker:*:*:endpoint/*",
      "Condition": {
        "Null": {
          "aws:ResourceTag/sagemaker:project-name": "false",
          "aws:ResourceTag/sagemaker:partner": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    }
  ]
}
```

------

## AWS 托管策略： AmazonSageMakerPartnerServiceCatalogProductsCloudFormationServiceRolePolicy
<a name="security-iam-awsmanpol-AmazonSageMakerPartnerServiceCatalogProductsCloudFormationServiceRolePolicy"></a>

此政策由 Amazon A SageMaker I 产品组合 AWS CloudFormation 中的 AWS Service Catalog 预配置产品使用。该策略旨在附加到一个 IAM 角色，该角色[AmazonSageMakerServiceCatalogProductsLaunchRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsLaunchRole)传递给由 CloudFormation 该角色创建的 AWS 资源需要一个角色。

**权限详细信息**

该策略包含以下权限。
+ `iam` - 传递 `AmazonSageMakerServiceCatalogProductsLambdaRole` 和 `AmazonSageMakerServiceCatalogProductsApiGatewayRole` 角色。
+ `lambda`— 创建、更新、删除和调用 AWS Lambda 函数；检索、发布和删除 Lambda 层的版本。
+ `apigateway` - 创建、更新和删除 Amazon API Gateway 资源。
+ `s3` - 从 Amazon Simple Storage Service (Amazon S3) 存储桶中检索 `lambda-auth-code/layer.zip` 文件。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "iam:PassRole"
      ],
      "Resource": [
        "arn:aws:iam::*:role/service-role/AmazonSageMakerServiceCatalogProductsLambdaRole"
      ],
      "Condition": {
        "StringEquals": {
          "iam:PassedToService": "lambda.amazonaws.com"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "iam:PassRole"
      ],
      "Resource": [
        "arn:aws:iam::*:role/service-role/AmazonSageMakerServiceCatalogProductsApiGatewayRole"
      ],
      "Condition": {
        "StringEquals": {
          "iam:PassedToService": "apigateway.amazonaws.com"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "lambda:DeleteFunction",
        "lambda:UpdateFunctionCode",
        "lambda:ListTags",
        "lambda:InvokeFunction"
      ],
      "Resource": [
        "arn:aws:lambda:*:*:function:sagemaker-*"
      ],
      "Condition": {
        "Null": {
          "aws:ResourceTag/sagemaker:project-name": "false",
          "aws:ResourceTag/sagemaker:partner": "false"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "lambda:CreateFunction",
        "lambda:TagResource"
      ],
      "Resource": [
        "arn:aws:lambda:*:*:function:sagemaker-*"
      ],
      "Condition": {
        "Null": {
          "aws:ResourceTag/sagemaker:project-name": "false",
          "aws:ResourceTag/sagemaker:partner": "false"
        },
        "ForAnyValue:StringEquals": {
          "aws:TagKeys": [
            "sagemaker:project-name",
            "sagemaker:partner"
          ]
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "lambda:PublishLayerVersion",
        "lambda:GetLayerVersion",
        "lambda:DeleteLayerVersion",
        "lambda:GetFunction"
      ],
      "Resource": [
        "arn:aws:lambda:*:*:layer:sagemaker-*",
        "arn:aws:lambda:*:*:function:sagemaker-*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "apigateway:GET",
        "apigateway:DELETE",
        "apigateway:PATCH",
        "apigateway:POST",
        "apigateway:PUT"
      ],
      "Resource": [
        "arn:aws:apigateway:*::/restapis/*",
        "arn:aws:apigateway:*::/restapis"
      ],
      "Condition": {
        "Null": {
          "aws:ResourceTag/sagemaker:project-name": "false",
          "aws:ResourceTag/sagemaker:partner": "false"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "apigateway:POST",
        "apigateway:PUT"
      ],
      "Resource": [
        "arn:aws:apigateway:*::/restapis",
        "arn:aws:apigateway:*::/tags/*"
      ],
      "Condition": {
        "Null": {
          "aws:ResourceTag/sagemaker:project-name": "false",
          "aws:ResourceTag/sagemaker:partner": "false"
        },
        "ForAnyValue:StringEquals": {
          "aws:TagKeys": [
            "sagemaker:project-name",
            "sagemaker:partner"
          ]
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject"
      ],
      "Resource": [
        "arn:aws:s3:::sagemaker-*/lambda-auth-code/layer.zip"
      ],
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    }
  ]
}
```

------

## AWS 托管策略： AmazonSageMakerPartnerServiceCatalogProductsLambdaServiceRolePolicy
<a name="security-iam-awsmanpol-AmazonSageMakerPartnerServiceCatalogProductsLambdaServiceRolePolicy"></a>

此政策由 Amazon A SageMaker I 产品组合 AWS Lambda 中的 AWS Service Catalog 预配置产品使用。该策略旨在附加到 IAM 角色，该角色将[AmazonSageMakerServiceCatalogProductsLaunchRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsLaunchRole)传递给 Lambda 创建的需要角色的 AWS 资源。

**权限详细信息**

该策略包含以下权限。
+ `secretsmanager` - 从合作伙伴为合作伙伴模板提供的密钥中检索数据。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "secretsmanager:GetSecretValue",
      "Resource": "arn:aws:secretsmanager:*:*:secret:*",
      "Condition": {
        "Null": {
          "aws:ResourceTag/sagemaker:partner": false
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    }
  ]
}
```

------

## AWS 托管策略： AmazonSageMakerServiceCatalogProductsApiGatewayServiceRolePolicy
<a name="security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsApiGatewayServiceRolePolicy"></a>

亚马逊 API Gatew SageMaker ay 在亚马逊 AI 产品组合中的 AWS Service Catalog 预配置产品中使用此政策。该策略旨在附加到 IAM 角色，该角色将[AmazonSageMakerServiceCatalogProductsLaunchRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsLaunchRole)传递给由 API Gateway 创建的需要角色的 AWS 资源。

**权限详细信息**

该策略包含以下权限。
+ `logs`— 创建和读取 CloudWatch 日志组、直播和事件；更新事件；描述各种资源。

  这些权限仅限于日志组前缀以“aws/apigateway/”开头的资源。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "logs:CreateLogDelivery",
        "logs:CreateLogGroup",
        "logs:CreateLogStream",
        "logs:DeleteLogDelivery",
        "logs:DescribeLogGroups",
        "logs:DescribeLogStreams",
        "logs:DescribeResourcePolicies",
        "logs:DescribeDestinations",
        "logs:DescribeExportTasks",
        "logs:DescribeMetricFilters",
        "logs:DescribeQueries",
        "logs:DescribeQueryDefinitions",
        "logs:DescribeSubscriptionFilters",
        "logs:GetLogDelivery",
        "logs:GetLogEvents",
        "logs:PutLogEvents",
        "logs:PutResourcePolicy",
        "logs:UpdateLogDelivery"
      ],
      "Resource": "arn:aws:logs:*:*:log-group:/aws/apigateway/*"
    }
  ]
}
```

------

## AWS 托管策略： AmazonSageMakerServiceCatalogProductsCloudformationServiceRole策略
<a name="security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsCloudformationServiceRolePolicy"></a>

此政策由 Amazon A SageMaker I 产品组合 AWS CloudFormation 中的 AWS Service Catalog 预配置产品使用。该策略旨在附加到一个 IAM 角色，该角色[AmazonSageMakerServiceCatalogProductsLaunchRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsLaunchRole)传递给由 CloudFormation 该角色创建的 AWS 资源需要一个角色。

**权限详细信息**

该策略包含以下权限。
+ `sagemaker`— 允许访问各种 SageMaker AI 资源，但域名、用户配置文件、应用程序和流程定义除外。
+ `iam` - 传递 `AmazonSageMakerServiceCatalogProductsCodeBuildRole` 和 `AmazonSageMakerServiceCatalogProductsExecutionRole` 角色。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "sagemaker:AddAssociation",
        "sagemaker:AddTags",
        "sagemaker:AssociateTrialComponent",
        "sagemaker:BatchDescribeModelPackage",
        "sagemaker:BatchGetMetrics",
        "sagemaker:BatchGetRecord",
        "sagemaker:BatchPutMetrics",
        "sagemaker:CreateAction",
        "sagemaker:CreateAlgorithm",
        "sagemaker:CreateApp",
        "sagemaker:CreateAppImageConfig",
        "sagemaker:CreateArtifact",
        "sagemaker:CreateAutoMLJob",
        "sagemaker:CreateCodeRepository",
        "sagemaker:CreateCompilationJob",
        "sagemaker:CreateContext",
        "sagemaker:CreateDataQualityJobDefinition",
        "sagemaker:CreateDeviceFleet",
        "sagemaker:CreateDomain",
        "sagemaker:CreateEdgePackagingJob",
        "sagemaker:CreateEndpoint",
        "sagemaker:CreateEndpointConfig",
        "sagemaker:CreateExperiment",
        "sagemaker:CreateFeatureGroup",
        "sagemaker:CreateFlowDefinition",
        "sagemaker:CreateHumanTaskUi",
        "sagemaker:CreateHyperParameterTuningJob",
        "sagemaker:CreateImage",
        "sagemaker:CreateImageVersion",
        "sagemaker:CreateInferenceRecommendationsJob",
        "sagemaker:CreateLabelingJob",
        "sagemaker:CreateLineageGroupPolicy",
        "sagemaker:CreateModel",
        "sagemaker:CreateModelBiasJobDefinition",
        "sagemaker:CreateModelExplainabilityJobDefinition",
        "sagemaker:CreateModelPackage",
        "sagemaker:CreateModelPackageGroup",
        "sagemaker:CreateModelQualityJobDefinition",
        "sagemaker:CreateMonitoringSchedule",
        "sagemaker:CreateNotebookInstance",
        "sagemaker:CreateNotebookInstanceLifecycleConfig",
        "sagemaker:CreatePipeline",
        "sagemaker:CreatePresignedDomainUrl",
        "sagemaker:CreatePresignedNotebookInstanceUrl",
        "sagemaker:CreateProcessingJob",
        "sagemaker:CreateProject",
        "sagemaker:CreateTrainingJob",
        "sagemaker:CreateTransformJob",
        "sagemaker:CreateTrial",
        "sagemaker:CreateTrialComponent",
        "sagemaker:CreateUserProfile",
        "sagemaker:CreateWorkforce",
        "sagemaker:CreateWorkteam",
        "sagemaker:DeleteAction",
        "sagemaker:DeleteAlgorithm",
        "sagemaker:DeleteApp",
        "sagemaker:DeleteAppImageConfig",
        "sagemaker:DeleteArtifact",
        "sagemaker:DeleteAssociation",
        "sagemaker:DeleteCodeRepository",
        "sagemaker:DeleteContext",
        "sagemaker:DeleteDataQualityJobDefinition",
        "sagemaker:DeleteDeviceFleet",
        "sagemaker:DeleteDomain",
        "sagemaker:DeleteEndpoint",
        "sagemaker:DeleteEndpointConfig",
        "sagemaker:DeleteExperiment",
        "sagemaker:DeleteFeatureGroup",
        "sagemaker:DeleteFlowDefinition",
        "sagemaker:DeleteHumanLoop",
        "sagemaker:DeleteHumanTaskUi",
        "sagemaker:DeleteImage",
        "sagemaker:DeleteImageVersion",
        "sagemaker:DeleteLineageGroupPolicy",
        "sagemaker:DeleteModel",
        "sagemaker:DeleteModelBiasJobDefinition",
        "sagemaker:DeleteModelExplainabilityJobDefinition",
        "sagemaker:DeleteModelPackage",
        "sagemaker:DeleteModelPackageGroup",
        "sagemaker:DeleteModelPackageGroupPolicy",
        "sagemaker:DeleteModelQualityJobDefinition",
        "sagemaker:DeleteMonitoringSchedule",
        "sagemaker:DeleteNotebookInstance",
        "sagemaker:DeleteNotebookInstanceLifecycleConfig",
        "sagemaker:DeletePipeline",
        "sagemaker:DeleteProject",
        "sagemaker:DeleteRecord",
        "sagemaker:DeleteTags",
        "sagemaker:DeleteTrial",
        "sagemaker:DeleteTrialComponent",
        "sagemaker:DeleteUserProfile",
        "sagemaker:DeleteWorkforce",
        "sagemaker:DeleteWorkteam",
        "sagemaker:DeregisterDevices",
        "sagemaker:DescribeAction",
        "sagemaker:DescribeAlgorithm",
        "sagemaker:DescribeApp",
        "sagemaker:DescribeAppImageConfig",
        "sagemaker:DescribeArtifact",
        "sagemaker:DescribeAutoMLJob",
        "sagemaker:DescribeCodeRepository",
        "sagemaker:DescribeCompilationJob",
        "sagemaker:DescribeContext",
        "sagemaker:DescribeDataQualityJobDefinition",
        "sagemaker:DescribeDevice",
        "sagemaker:DescribeDeviceFleet",
        "sagemaker:DescribeDomain",
        "sagemaker:DescribeEdgePackagingJob",
        "sagemaker:DescribeEndpoint",
        "sagemaker:DescribeEndpointConfig",
        "sagemaker:DescribeExperiment",
        "sagemaker:DescribeFeatureGroup",
        "sagemaker:DescribeFlowDefinition",
        "sagemaker:DescribeHumanLoop",
        "sagemaker:DescribeHumanTaskUi",
        "sagemaker:DescribeHyperParameterTuningJob",
        "sagemaker:DescribeImage",
        "sagemaker:DescribeImageVersion",
        "sagemaker:DescribeInferenceRecommendationsJob",
        "sagemaker:DescribeLabelingJob",
        "sagemaker:DescribeLineageGroup",
        "sagemaker:DescribeModel",
        "sagemaker:DescribeModelBiasJobDefinition",
        "sagemaker:DescribeModelExplainabilityJobDefinition",
        "sagemaker:DescribeModelPackage",
        "sagemaker:DescribeModelPackageGroup",
        "sagemaker:DescribeModelQualityJobDefinition",
        "sagemaker:DescribeMonitoringSchedule",
        "sagemaker:DescribeNotebookInstance",
        "sagemaker:DescribeNotebookInstanceLifecycleConfig",
        "sagemaker:DescribePipeline",
        "sagemaker:DescribePipelineDefinitionForExecution",
        "sagemaker:DescribePipelineExecution",
        "sagemaker:DescribeProcessingJob",
        "sagemaker:DescribeProject",
        "sagemaker:DescribeSubscribedWorkteam",
        "sagemaker:DescribeTrainingJob",
        "sagemaker:DescribeTransformJob",
        "sagemaker:DescribeTrial",
        "sagemaker:DescribeTrialComponent",
        "sagemaker:DescribeUserProfile",
        "sagemaker:DescribeWorkforce",
        "sagemaker:DescribeWorkteam",
        "sagemaker:DisableSagemakerServicecatalogPortfolio",
        "sagemaker:DisassociateTrialComponent",
        "sagemaker:EnableSagemakerServicecatalogPortfolio",
        "sagemaker:GetDeviceFleetReport",
        "sagemaker:GetDeviceRegistration",
        "sagemaker:GetLineageGroupPolicy",
        "sagemaker:GetModelPackageGroupPolicy",
        "sagemaker:GetRecord",
        "sagemaker:GetSagemakerServicecatalogPortfolioStatus",
        "sagemaker:GetSearchSuggestions",
        "sagemaker:InvokeEndpoint",
        "sagemaker:InvokeEndpointAsync",
        "sagemaker:ListActions",
        "sagemaker:ListAlgorithms",
        "sagemaker:ListAppImageConfigs",
        "sagemaker:ListApps",
        "sagemaker:ListArtifacts",
        "sagemaker:ListAssociations",
        "sagemaker:ListAutoMLJobs",
        "sagemaker:ListCandidatesForAutoMLJob",
        "sagemaker:ListCodeRepositories",
        "sagemaker:ListCompilationJobs",
        "sagemaker:ListContexts",
        "sagemaker:ListDataQualityJobDefinitions",
        "sagemaker:ListDeviceFleets",
        "sagemaker:ListDevices",
        "sagemaker:ListDomains",
        "sagemaker:ListEdgePackagingJobs",
        "sagemaker:ListEndpointConfigs",
        "sagemaker:ListEndpoints",
        "sagemaker:ListExperiments",
        "sagemaker:ListFeatureGroups",
        "sagemaker:ListFlowDefinitions",
        "sagemaker:ListHumanLoops",
        "sagemaker:ListHumanTaskUis",
        "sagemaker:ListHyperParameterTuningJobs",
        "sagemaker:ListImageVersions",
        "sagemaker:ListImages",
        "sagemaker:ListInferenceRecommendationsJobs",
        "sagemaker:ListLabelingJobs",
        "sagemaker:ListLabelingJobsForWorkteam",
        "sagemaker:ListLineageGroups",
        "sagemaker:ListModelBiasJobDefinitions",
        "sagemaker:ListModelExplainabilityJobDefinitions",
        "sagemaker:ListModelMetadata",
        "sagemaker:ListModelPackageGroups",
        "sagemaker:ListModelPackages",
        "sagemaker:ListModelQualityJobDefinitions",
        "sagemaker:ListModels",
        "sagemaker:ListMonitoringExecutions",
        "sagemaker:ListMonitoringSchedules",
        "sagemaker:ListNotebookInstanceLifecycleConfigs",
        "sagemaker:ListNotebookInstances",
        "sagemaker:ListPipelineExecutionSteps",
        "sagemaker:ListPipelineExecutions",
        "sagemaker:ListPipelineParametersForExecution",
        "sagemaker:ListPipelines",
        "sagemaker:ListProcessingJobs",
        "sagemaker:ListProjects",
        "sagemaker:ListSubscribedWorkteams",
        "sagemaker:ListTags",
        "sagemaker:ListTrainingJobs",
        "sagemaker:ListTrainingJobsForHyperParameterTuningJob",
        "sagemaker:ListTransformJobs",
        "sagemaker:ListTrialComponents",
        "sagemaker:ListTrials",
        "sagemaker:ListUserProfiles",
        "sagemaker:ListWorkforces",
        "sagemaker:ListWorkteams",
        "sagemaker:PutLineageGroupPolicy",
        "sagemaker:PutModelPackageGroupPolicy",
        "sagemaker:PutRecord",
        "sagemaker:QueryLineage",
        "sagemaker:RegisterDevices",
        "sagemaker:RenderUiTemplate",
        "sagemaker:Search",
        "sagemaker:SendHeartbeat",
        "sagemaker:SendPipelineExecutionStepFailure",
        "sagemaker:SendPipelineExecutionStepSuccess",
        "sagemaker:StartHumanLoop",
        "sagemaker:StartMonitoringSchedule",
        "sagemaker:StartNotebookInstance",
        "sagemaker:StartPipelineExecution",
        "sagemaker:StopAutoMLJob",
        "sagemaker:StopCompilationJob",
        "sagemaker:StopEdgePackagingJob",
        "sagemaker:StopHumanLoop",
        "sagemaker:StopHyperParameterTuningJob",
        "sagemaker:StopInferenceRecommendationsJob",
        "sagemaker:StopLabelingJob",
        "sagemaker:StopMonitoringSchedule",
        "sagemaker:StopNotebookInstance",
        "sagemaker:StopPipelineExecution",
        "sagemaker:StopProcessingJob",
        "sagemaker:StopTrainingJob",
        "sagemaker:StopTransformJob",
        "sagemaker:UpdateAction",
        "sagemaker:UpdateAppImageConfig",
        "sagemaker:UpdateArtifact",
        "sagemaker:UpdateCodeRepository",
        "sagemaker:UpdateContext",
        "sagemaker:UpdateDeviceFleet",
        "sagemaker:UpdateDevices",
        "sagemaker:UpdateDomain",
        "sagemaker:UpdateEndpoint",
        "sagemaker:UpdateEndpointWeightsAndCapacities",
        "sagemaker:UpdateExperiment",
        "sagemaker:UpdateImage",
        "sagemaker:UpdateModelPackage",
        "sagemaker:UpdateMonitoringSchedule",
        "sagemaker:UpdateNotebookInstance",
        "sagemaker:UpdateNotebookInstanceLifecycleConfig",
        "sagemaker:UpdatePipeline",
        "sagemaker:UpdatePipelineExecution",
        "sagemaker:UpdateProject",
        "sagemaker:UpdateTrainingJob",
        "sagemaker:UpdateTrial",
        "sagemaker:UpdateTrialComponent",
        "sagemaker:UpdateUserProfile",
        "sagemaker:UpdateWorkforce",
        "sagemaker:UpdateWorkteam"
      ],
      "NotResource": [
        "arn:aws:sagemaker:*:*:domain/*",
        "arn:aws:sagemaker:*:*:user-profile/*",
        "arn:aws:sagemaker:*:*:app/*",
        "arn:aws:sagemaker:*:*:flow-definition/*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "iam:PassRole"
      ],
      "Resource": [
        "arn:aws:iam::*:role/service-role/AmazonSageMakerServiceCatalogProductsCodeBuildRole",
        "arn:aws:iam::*:role/service-role/AmazonSageMakerServiceCatalogProductsExecutionRole"
      ]
    }
  ]
}
```

------

## AWS 托管策略： AmazonSageMakerServiceCatalogProductsCodeBuildServiceRolePolicy
<a name="security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsCodeBuildServiceRolePolicy"></a>

此政策由 Amazon A SageMaker I 产品组合 AWS CodeBuild 中的 AWS Service Catalog 预配置产品使用。该策略旨在附加到一个 IAM 角色，该角色[AmazonSageMakerServiceCatalogProductsLaunchRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsLaunchRole)传递给由 CodeBuild 该角色创建的 AWS 资源需要一个角色。

**权限详细信息**

该策略包含以下权限。
+ `sagemaker`— 允许访问各种 SageMaker AI 资源。
+ `codecommit`— 将 CodeCommit 档案上传到 CodeBuild 管道，获取上传状态并取消上传；获取分支和提交信息。这些权限仅限于名称以“sagemaker-”开头的资源。
+ `ecr` - 创建 Amazon ECR 存储库和容器映像；上传映像层。这些权限仅限于名称以“sagemaker-”开头的存储库。

  `ecr` - 阅读所有资源。
+ `iam` - 传递以下角色：
  + `AmazonSageMakerServiceCatalogProductsCloudformationRole`到 AWS CloudFormation。
  + `AmazonSageMakerServiceCatalogProductsCodeBuildRole`到 AWS CodeBuild。
  + `AmazonSageMakerServiceCatalogProductsCodePipelineRole`到 AWS CodePipeline。
  + `AmazonSageMakerServiceCatalogProductsEventsRole`到亚马逊 EventBridge。
  + `AmazonSageMakerServiceCatalogProductsExecutionRole`到 Amazon SageMaker AI。
+ `logs`— 创建和读取 CloudWatch 日志组、直播和事件；更新事件；描述各种资源。

  这些权限仅限于名称前缀以“aws/codebuild/”开头的资源。
+ `s3` - 创建、读取和列出 Amazon S3 存储桶。这些权限仅限于名称以“sagemaker-”开头的存储桶。
+ `codeconnections`，`codestar-connections`— 使用 AWS CodeConnections 和 AWS CodeStar 连接。

要查看此策略的权限，请参阅《 AWS 托管策略参考》[AmazonSageMakerServiceCatalogProductsCodeBuildServiceRolePolicy](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonSageMakerServiceCatalogProductsCodeBuildServiceRolePolicy.html)中的。

## AWS 托管策略： AmazonSageMakerServiceCatalogProductsCodePipelineServiceRolePolicy
<a name="security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsCodePipelineServiceRolePolicy"></a>

此政策由 Amazon A SageMaker I 产品组合 AWS CodePipeline 中的 AWS Service Catalog 预配置产品使用。该策略旨在附加到一个 IAM 角色，该角色[AmazonSageMakerServiceCatalogProductsLaunchRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsLaunchRole)传递给由 CodePipeline 该角色创建的 AWS 资源需要一个角色。

**权限详细信息**

该策略包含以下权限。
+ `cloudformation`— 创建、读取、删除和更新 CloudFormation堆栈；创建、读取、删除和执行更改集；设置堆栈策略；标记和取消标记资源。这些权限仅限于名称以“sagemaker-”开头的资源。
+ `s3` - 创建、读取、列出和删除 Amazon S3 存储桶；在存储桶中添加、读取和删除对象；读取和设置 CORS 配置；读取访问控制列表 (ACL)；以及读取存储桶所在的 AWS 区域。

  这些权限仅限于名称以“sagemaker-”或“aws-glue-”开头的存储桶。
+ `iam` - 传递 `AmazonSageMakerServiceCatalogProductsCloudformationRole` 角色。
+ `codebuild`— 获取 CodeBuild 构建信息并开始构建。这些权限仅限于名称以“sagemaker-”开头的项目和构建资源。
+ `codecommit`— 将 CodeCommit 档案上传到 CodeBuild 管道，获取上传状态并取消上传；获取分支和提交信息。
+ `codeconnections`，`codestar-connections`— 使用 AWS CodeConnections 和 AWS CodeStar 连接。

要查看此策略的权限，请参阅《 AWS 托管策略参考》[AmazonSageMakerServiceCatalogProductsCodePipelineServiceRolePolicy](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonSageMakerServiceCatalogProductsCodePipelineServiceRolePolicy.html)中的。

## AWS 托管策略： AmazonSageMakerServiceCatalogProductsEventsServiceRole策略
<a name="security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsEventsServiceRolePolicy"></a>

亚马逊 EventBridge 在 Amazon A SageMaker I 产品组合中的 AWS Service Catalog 预配置产品中使用此政策。该策略旨在附加到一个 IAM 角色，该角色[AmazonSageMakerServiceCatalogProductsLaunchRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsLaunchRole)传递给由 EventBridge 该角色创建的 AWS 资源需要一个角色。

**权限详细信息**

该策略包含以下权限。
+ `codepipeline`— 开始 CodeBuild 执行。这些权限仅限于名称以“sagemaker-”开头的管道。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "codepipeline:StartPipelineExecution",
      "Resource": "arn:aws:codepipeline:*:*:sagemaker-*"
    }
  ]
}
```

------

## AWS 托管策略： AmazonSageMakerServiceCatalogProductsFirehoseServiceRole策略
<a name="security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsFirehoseServiceRolePolicy"></a>

亚马逊 Data Firehose 在亚马逊 AI 产品组合中的 AWS Service Catalog 预配置产品中使用此政策。 SageMaker 该策略旨在附加到 IAM 角色，该角色将[AmazonSageMakerServiceCatalogProductsLaunchRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsLaunchRole)传递给 Firehose 创建的需要角色的 AWS 资源。

**权限详细信息**

该策略包含以下权限。
+ `firehose`：发送 Firehose 记录。这些权限仅限于传输流名称以“sagemaker-”开头的资源。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": [
        "firehose:PutRecord",
        "firehose:PutRecordBatch"
      ],
      "Resource": "arn:aws:firehose:*:*:deliverystream/sagemaker-*"
    }
  ]
}
```

------

## AWS 托管策略： AmazonSageMakerServiceCatalogProductsGlueServiceRole策略
<a name="security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsGlueServiceRolePolicy"></a>

 AWS Glue 在 S AWS ervice Catalog 配置的亚马逊 SageMaker 人工智能产品组合中使用此政策。该策略旨在附加到 IAM 角色，该角色将[AmazonSageMakerServiceCatalogProductsLaunchRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsLaunchRole)传递给 Glue 创建的需要角色的 AWS 资源。

**权限详细信息**

该策略包含以下权限。
+ `glue`— 创建、读取和删除 AWS Glue 分区、表和表版本。这些权限仅限于名称以“sagemaker-”开头的资源。创建和读取 AWS Glue 数据库。这些权限仅限于名称为“default”、“global\$1temp”或以“sagemaker-”开头的数据库。获取用户定义的函数。
+ `s3` - 创建、读取、列出和删除 Amazon S3 存储桶；在存储桶中添加、读取和删除对象；读取和设置 CORS 配置；读取访问控制列表 (ACL)；以及读取存储桶所在的 AWS 区域。

  这些权限仅限于名称以“sagemaker-”或“aws-glue-”开头的存储桶。
+ `logs`— 创建、读取和删除 CloudWatch 日志组、流和传输；并创建资源策略。

  这些权限仅限于名称前缀以“aws/glue/”开头的资源。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "glue:BatchCreatePartition",
        "glue:BatchDeletePartition",
        "glue:BatchDeleteTable",
        "glue:BatchDeleteTableVersion",
        "glue:BatchGetPartition",
        "glue:CreateDatabase",
        "glue:CreatePartition",
        "glue:CreateTable",
        "glue:DeletePartition",
        "glue:DeleteTable",
        "glue:DeleteTableVersion",
        "glue:GetDatabase",
        "glue:GetPartition",
        "glue:GetPartitions",
        "glue:GetTable",
        "glue:GetTables",
        "glue:GetTableVersion",
        "glue:GetTableVersions",
        "glue:SearchTables",
        "glue:UpdatePartition",
        "glue:UpdateTable",
        "glue:GetUserDefinedFunctions"
      ],
      "Resource": [
        "arn:aws:glue:*:*:catalog",
        "arn:aws:glue:*:*:database/default",
        "arn:aws:glue:*:*:database/global_temp",
        "arn:aws:glue:*:*:database/sagemaker-*",
        "arn:aws:glue:*:*:table/sagemaker-*",
        "arn:aws:glue:*:*:tableVersion/sagemaker-*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:CreateBucket",
        "s3:DeleteBucket",
        "s3:GetBucketAcl",
        "s3:GetBucketCors",
        "s3:GetBucketLocation",
        "s3:ListAllMyBuckets",
        "s3:ListBucket",
        "s3:ListBucketMultipartUploads",
        "s3:PutBucketCors"
      ],
      "Resource": [
        "arn:aws:s3:::aws-glue-*",
        "arn:aws:s3:::sagemaker-*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:AbortMultipartUpload",
        "s3:DeleteObject",
        "s3:GetObject",
        "s3:GetObjectVersion",
        "s3:PutObject"
      ],
      "Resource": [
        "arn:aws:s3:::aws-glue-*",
        "arn:aws:s3:::sagemaker-*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "logs:CreateLogDelivery",
        "logs:CreateLogGroup",
        "logs:CreateLogStream",
        "logs:DeleteLogDelivery",
        "logs:Describe*",
        "logs:GetLogDelivery",
        "logs:GetLogEvents",
        "logs:ListLogDeliveries",
        "logs:PutLogEvents",
        "logs:PutResourcePolicy",
        "logs:UpdateLogDelivery"
      ],
      "Resource": "arn:aws:logs:*:*:log-group:/aws/glue/*"
    }
  ]
}
```

------

## AWS 托管策略： AmazonSageMakerServiceCatalogProductsLambdaServiceRole策略
<a name="security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsLambdaServiceRolePolicy"></a>

此政策由 Amazon A SageMaker I 产品组合 AWS Lambda 中的 AWS Service Catalog 预配置产品使用。该策略旨在附加到 IAM 角色，该角色将[AmazonSageMakerServiceCatalogProductsLaunchRole](https://console.aws.amazon.com/iam/home?#/roles/AmazonSageMakerServiceCatalogProductsLaunchRole)传递给 Lambda 创建的需要角色的 AWS 资源。

**权限详细信息**

该策略包含以下权限。
+ `sagemaker`— 允许访问各种 SageMaker AI 资源。
+ `ecr` - 创建和删除 Amazon ECR 存储库；创建、读取和删除容器映像；上传映像层。这些权限仅限于名称以“sagemaker-”开头的存储库。
+ `events`— 创建、读取和删除 Amazon EventBridge 规则；以及创建和删除目标。这些权限仅限于名称以“sagemaker-”开头的规则。
+ `s3` - 创建、读取、列出和删除 Amazon S3 存储桶；在存储桶中添加、读取和删除对象；读取和设置 CORS 配置；读取访问控制列表 (ACL)；以及读取存储桶所在的 AWS 区域。

  这些权限仅限于名称以“sagemaker-”或“aws-glue-”开头的存储桶。
+ `iam` - 传递 `AmazonSageMakerServiceCatalogProductsExecutionRole` 角色。
+ `logs`— 创建、读取和删除 CloudWatch 日志组、流和传输；并创建资源策略。

  这些权限仅限于名称前缀以“aws/lambda/”开头的资源。
+ `codebuild`— 开始并获取有关 AWS CodeBuild 版本的信息。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid" : "AmazonSageMakerLambdaECRPermission",
      "Effect": "Allow",
      "Action": [
        "ecr:DescribeImages",
        "ecr:BatchDeleteImage",
        "ecr:CompleteLayerUpload",
        "ecr:CreateRepository",
        "ecr:DeleteRepository",
        "ecr:InitiateLayerUpload",
        "ecr:PutImage",
        "ecr:UploadLayerPart"
      ],
      "Resource": [
        "arn:aws:ecr:*:*:repository/sagemaker-*"
      ]
    },
    {
      "Sid" : "AmazonSageMakerLambdaEventBridgePermission",
      "Effect": "Allow",
      "Action": [
        "events:DeleteRule",
        "events:DescribeRule",
        "events:PutRule",
        "events:PutTargets",
        "events:RemoveTargets"
      ],
      "Resource": [
        "arn:aws:events:*:*:rule/sagemaker-*"
      ]
    },
    {
      "Sid" : "AmazonSageMakerLambdaS3BucketPermission",
      "Effect": "Allow",
      "Action": [
        "s3:CreateBucket",
        "s3:DeleteBucket",
        "s3:GetBucketAcl",
        "s3:GetBucketCors",
        "s3:GetBucketLocation",
        "s3:ListAllMyBuckets",
        "s3:ListBucket",
        "s3:ListBucketMultipartUploads",
        "s3:PutBucketCors"
      ],
      "Resource": [
        "arn:aws:s3:::aws-glue-*",
        "arn:aws:s3:::sagemaker-*"
      ]
    },
    {
      "Sid" : "AmazonSageMakerLambdaS3ObjectPermission",
      "Effect": "Allow",
      "Action": [
        "s3:AbortMultipartUpload",
        "s3:DeleteObject",
        "s3:GetObject",
        "s3:GetObjectVersion",
        "s3:PutObject"
      ],
      "Resource": [
        "arn:aws:s3:::aws-glue-*",
        "arn:aws:s3:::sagemaker-*"
      ]
    },
    {
      "Sid" : "AmazonSageMakerLambdaSageMakerPermission",
      "Effect": "Allow",
      "Action": [
        "sagemaker:AddAssociation",
        "sagemaker:AddTags",
        "sagemaker:AssociateTrialComponent",
        "sagemaker:BatchDescribeModelPackage",
        "sagemaker:BatchGetMetrics",
        "sagemaker:BatchGetRecord",
        "sagemaker:BatchPutMetrics",
        "sagemaker:CreateAction",
        "sagemaker:CreateAlgorithm",
        "sagemaker:CreateApp",
        "sagemaker:CreateAppImageConfig",
        "sagemaker:CreateArtifact",
        "sagemaker:CreateAutoMLJob",
        "sagemaker:CreateCodeRepository",
        "sagemaker:CreateCompilationJob",
        "sagemaker:CreateContext",
        "sagemaker:CreateDataQualityJobDefinition",
        "sagemaker:CreateDeviceFleet",
        "sagemaker:CreateDomain",
        "sagemaker:CreateEdgePackagingJob",
        "sagemaker:CreateEndpoint",
        "sagemaker:CreateEndpointConfig",
        "sagemaker:CreateExperiment",
        "sagemaker:CreateFeatureGroup",
        "sagemaker:CreateFlowDefinition",
        "sagemaker:CreateHumanTaskUi",
        "sagemaker:CreateHyperParameterTuningJob",
        "sagemaker:CreateImage",
        "sagemaker:CreateImageVersion",
        "sagemaker:CreateInferenceRecommendationsJob",
        "sagemaker:CreateLabelingJob",
        "sagemaker:CreateLineageGroupPolicy",
        "sagemaker:CreateModel",
        "sagemaker:CreateModelBiasJobDefinition",
        "sagemaker:CreateModelExplainabilityJobDefinition",
        "sagemaker:CreateModelPackage",
        "sagemaker:CreateModelPackageGroup",
        "sagemaker:CreateModelQualityJobDefinition",
        "sagemaker:CreateMonitoringSchedule",
        "sagemaker:CreateNotebookInstance",
        "sagemaker:CreateNotebookInstanceLifecycleConfig",
        "sagemaker:CreatePipeline",
        "sagemaker:CreatePresignedDomainUrl",
        "sagemaker:CreatePresignedNotebookInstanceUrl",
        "sagemaker:CreateProcessingJob",
        "sagemaker:CreateProject",
        "sagemaker:CreateTrainingJob",
        "sagemaker:CreateTransformJob",
        "sagemaker:CreateTrial",
        "sagemaker:CreateTrialComponent",
        "sagemaker:CreateUserProfile",
        "sagemaker:CreateWorkforce",
        "sagemaker:CreateWorkteam",
        "sagemaker:DeleteAction",
        "sagemaker:DeleteAlgorithm",
        "sagemaker:DeleteApp",
        "sagemaker:DeleteAppImageConfig",
        "sagemaker:DeleteArtifact",
        "sagemaker:DeleteAssociation",
        "sagemaker:DeleteCodeRepository",
        "sagemaker:DeleteContext",
        "sagemaker:DeleteDataQualityJobDefinition",
        "sagemaker:DeleteDeviceFleet",
        "sagemaker:DeleteDomain",
        "sagemaker:DeleteEndpoint",
        "sagemaker:DeleteEndpointConfig",
        "sagemaker:DeleteExperiment",
        "sagemaker:DeleteFeatureGroup",
        "sagemaker:DeleteFlowDefinition",
        "sagemaker:DeleteHumanLoop",
        "sagemaker:DeleteHumanTaskUi",
        "sagemaker:DeleteImage",
        "sagemaker:DeleteImageVersion",
        "sagemaker:DeleteLineageGroupPolicy",
        "sagemaker:DeleteModel",
        "sagemaker:DeleteModelBiasJobDefinition",
        "sagemaker:DeleteModelExplainabilityJobDefinition",
        "sagemaker:DeleteModelPackage",
        "sagemaker:DeleteModelPackageGroup",
        "sagemaker:DeleteModelPackageGroupPolicy",
        "sagemaker:DeleteModelQualityJobDefinition",
        "sagemaker:DeleteMonitoringSchedule",
        "sagemaker:DeleteNotebookInstance",
        "sagemaker:DeleteNotebookInstanceLifecycleConfig",
        "sagemaker:DeletePipeline",
        "sagemaker:DeleteProject",
        "sagemaker:DeleteRecord",
        "sagemaker:DeleteTags",
        "sagemaker:DeleteTrial",
        "sagemaker:DeleteTrialComponent",
        "sagemaker:DeleteUserProfile",
        "sagemaker:DeleteWorkforce",
        "sagemaker:DeleteWorkteam",
        "sagemaker:DeregisterDevices",
        "sagemaker:DescribeAction",
        "sagemaker:DescribeAlgorithm",
        "sagemaker:DescribeApp",
        "sagemaker:DescribeAppImageConfig",
        "sagemaker:DescribeArtifact",
        "sagemaker:DescribeAutoMLJob",
        "sagemaker:DescribeCodeRepository",
        "sagemaker:DescribeCompilationJob",
        "sagemaker:DescribeContext",
        "sagemaker:DescribeDataQualityJobDefinition",
        "sagemaker:DescribeDevice",
        "sagemaker:DescribeDeviceFleet",
        "sagemaker:DescribeDomain",
        "sagemaker:DescribeEdgePackagingJob",
        "sagemaker:DescribeEndpoint",
        "sagemaker:DescribeEndpointConfig",
        "sagemaker:DescribeExperiment",
        "sagemaker:DescribeFeatureGroup",
        "sagemaker:DescribeFlowDefinition",
        "sagemaker:DescribeHumanLoop",
        "sagemaker:DescribeHumanTaskUi",
        "sagemaker:DescribeHyperParameterTuningJob",
        "sagemaker:DescribeImage",
        "sagemaker:DescribeImageVersion",
        "sagemaker:DescribeInferenceRecommendationsJob",
        "sagemaker:DescribeLabelingJob",
        "sagemaker:DescribeLineageGroup",
        "sagemaker:DescribeModel",
        "sagemaker:DescribeModelBiasJobDefinition",
        "sagemaker:DescribeModelExplainabilityJobDefinition",
        "sagemaker:DescribeModelPackage",
        "sagemaker:DescribeModelPackageGroup",
        "sagemaker:DescribeModelQualityJobDefinition",
        "sagemaker:DescribeMonitoringSchedule",
        "sagemaker:DescribeNotebookInstance",
        "sagemaker:DescribeNotebookInstanceLifecycleConfig",
        "sagemaker:DescribePipeline",
        "sagemaker:DescribePipelineDefinitionForExecution",
        "sagemaker:DescribePipelineExecution",
        "sagemaker:DescribeProcessingJob",
        "sagemaker:DescribeProject",
        "sagemaker:DescribeSubscribedWorkteam",
        "sagemaker:DescribeTrainingJob",
        "sagemaker:DescribeTransformJob",
        "sagemaker:DescribeTrial",
        "sagemaker:DescribeTrialComponent",
        "sagemaker:DescribeUserProfile",
        "sagemaker:DescribeWorkforce",
        "sagemaker:DescribeWorkteam",
        "sagemaker:DisableSagemakerServicecatalogPortfolio",
        "sagemaker:DisassociateTrialComponent",
        "sagemaker:EnableSagemakerServicecatalogPortfolio",
        "sagemaker:GetDeviceFleetReport",
        "sagemaker:GetDeviceRegistration",
        "sagemaker:GetLineageGroupPolicy",
        "sagemaker:GetModelPackageGroupPolicy",
        "sagemaker:GetRecord",
        "sagemaker:GetSagemakerServicecatalogPortfolioStatus",
        "sagemaker:GetSearchSuggestions",
        "sagemaker:InvokeEndpoint",
        "sagemaker:InvokeEndpointAsync",
        "sagemaker:ListActions",
        "sagemaker:ListAlgorithms",
        "sagemaker:ListAppImageConfigs",
        "sagemaker:ListApps",
        "sagemaker:ListArtifacts",
        "sagemaker:ListAssociations",
        "sagemaker:ListAutoMLJobs",
        "sagemaker:ListCandidatesForAutoMLJob",
        "sagemaker:ListCodeRepositories",
        "sagemaker:ListCompilationJobs",
        "sagemaker:ListContexts",
        "sagemaker:ListDataQualityJobDefinitions",
        "sagemaker:ListDeviceFleets",
        "sagemaker:ListDevices",
        "sagemaker:ListDomains",
        "sagemaker:ListEdgePackagingJobs",
        "sagemaker:ListEndpointConfigs",
        "sagemaker:ListEndpoints",
        "sagemaker:ListExperiments",
        "sagemaker:ListFeatureGroups",
        "sagemaker:ListFlowDefinitions",
        "sagemaker:ListHumanLoops",
        "sagemaker:ListHumanTaskUis",
        "sagemaker:ListHyperParameterTuningJobs",
        "sagemaker:ListImageVersions",
        "sagemaker:ListImages",
        "sagemaker:ListInferenceRecommendationsJobs",
        "sagemaker:ListLabelingJobs",
        "sagemaker:ListLabelingJobsForWorkteam",
        "sagemaker:ListLineageGroups",
        "sagemaker:ListModelBiasJobDefinitions",
        "sagemaker:ListModelExplainabilityJobDefinitions",
        "sagemaker:ListModelMetadata",
        "sagemaker:ListModelPackageGroups",
        "sagemaker:ListModelPackages",
        "sagemaker:ListModelQualityJobDefinitions",
        "sagemaker:ListModels",
        "sagemaker:ListMonitoringExecutions",
        "sagemaker:ListMonitoringSchedules",
        "sagemaker:ListNotebookInstanceLifecycleConfigs",
        "sagemaker:ListNotebookInstances",
        "sagemaker:ListPipelineExecutionSteps",
        "sagemaker:ListPipelineExecutions",
        "sagemaker:ListPipelineParametersForExecution",
        "sagemaker:ListPipelines",
        "sagemaker:ListProcessingJobs",
        "sagemaker:ListProjects",
        "sagemaker:ListSubscribedWorkteams",
        "sagemaker:ListTags",
        "sagemaker:ListTrainingJobs",
        "sagemaker:ListTrainingJobsForHyperParameterTuningJob",
        "sagemaker:ListTransformJobs",
        "sagemaker:ListTrialComponents",
        "sagemaker:ListTrials",
        "sagemaker:ListUserProfiles",
        "sagemaker:ListWorkforces",
        "sagemaker:ListWorkteams",
        "sagemaker:PutLineageGroupPolicy",
        "sagemaker:PutModelPackageGroupPolicy",
        "sagemaker:PutRecord",
        "sagemaker:QueryLineage",
        "sagemaker:RegisterDevices",
        "sagemaker:RenderUiTemplate",
        "sagemaker:Search",
        "sagemaker:SendHeartbeat",
        "sagemaker:SendPipelineExecutionStepFailure",
        "sagemaker:SendPipelineExecutionStepSuccess",
        "sagemaker:StartHumanLoop",
        "sagemaker:StartMonitoringSchedule",
        "sagemaker:StartNotebookInstance",
        "sagemaker:StartPipelineExecution",
        "sagemaker:StopAutoMLJob",
        "sagemaker:StopCompilationJob",
        "sagemaker:StopEdgePackagingJob",
        "sagemaker:StopHumanLoop",
        "sagemaker:StopHyperParameterTuningJob",
        "sagemaker:StopInferenceRecommendationsJob",
        "sagemaker:StopLabelingJob",
        "sagemaker:StopMonitoringSchedule",
        "sagemaker:StopNotebookInstance",
        "sagemaker:StopPipelineExecution",
        "sagemaker:StopProcessingJob",
        "sagemaker:StopTrainingJob",
        "sagemaker:StopTransformJob",
        "sagemaker:UpdateAction",
        "sagemaker:UpdateAppImageConfig",
        "sagemaker:UpdateArtifact",
        "sagemaker:UpdateCodeRepository",
        "sagemaker:UpdateContext",
        "sagemaker:UpdateDeviceFleet",
        "sagemaker:UpdateDevices",
        "sagemaker:UpdateDomain",
        "sagemaker:UpdateEndpoint",
        "sagemaker:UpdateEndpointWeightsAndCapacities",
        "sagemaker:UpdateExperiment",
        "sagemaker:UpdateImage",
        "sagemaker:UpdateModelPackage",
        "sagemaker:UpdateMonitoringSchedule",
        "sagemaker:UpdateNotebookInstance",
        "sagemaker:UpdateNotebookInstanceLifecycleConfig",
        "sagemaker:UpdatePipeline",
        "sagemaker:UpdatePipelineExecution",
        "sagemaker:UpdateProject",
        "sagemaker:UpdateTrainingJob",
        "sagemaker:UpdateTrial",
        "sagemaker:UpdateTrialComponent",
        "sagemaker:UpdateUserProfile",
        "sagemaker:UpdateWorkforce",
        "sagemaker:UpdateWorkteam"
      ],
      "Resource": [
        "arn:aws:sagemaker:*:*:action/*",
        "arn:aws:sagemaker:*:*:algorithm/*",
        "arn:aws:sagemaker:*:*:app-image-config/*",
        "arn:aws:sagemaker:*:*:artifact/*",
        "arn:aws:sagemaker:*:*:automl-job/*",
        "arn:aws:sagemaker:*:*:code-repository/*",
        "arn:aws:sagemaker:*:*:compilation-job/*",
        "arn:aws:sagemaker:*:*:context/*",
        "arn:aws:sagemaker:*:*:data-quality-job-definition/*",
        "arn:aws:sagemaker:*:*:device-fleet/*/device/*",
        "arn:aws:sagemaker:*:*:device-fleet/*",
        "arn:aws:sagemaker:*:*:edge-packaging-job/*",
        "arn:aws:sagemaker:*:*:endpoint/*",
        "arn:aws:sagemaker:*:*:endpoint-config/*",
        "arn:aws:sagemaker:*:*:experiment/*",
        "arn:aws:sagemaker:*:*:experiment-trial/*",
        "arn:aws:sagemaker:*:*:experiment-trial-component/*",
        "arn:aws:sagemaker:*:*:feature-group/*",
        "arn:aws:sagemaker:*:*:human-loop/*",
        "arn:aws:sagemaker:*:*:human-task-ui/*",
        "arn:aws:sagemaker:*:*:hyper-parameter-tuning-job/*",
        "arn:aws:sagemaker:*:*:image/*",
        "arn:aws:sagemaker:*:*:image-version/*/*",
        "arn:aws:sagemaker:*:*:inference-recommendations-job/*",
        "arn:aws:sagemaker:*:*:labeling-job/*",
        "arn:aws:sagemaker:*:*:model/*",
        "arn:aws:sagemaker:*:*:model-bias-job-definition/*",
        "arn:aws:sagemaker:*:*:model-explainability-job-definition/*",
        "arn:aws:sagemaker:*:*:model-package/*",
        "arn:aws:sagemaker:*:*:model-package-group/*",
        "arn:aws:sagemaker:*:*:model-quality-job-definition/*",
        "arn:aws:sagemaker:*:*:monitoring-schedule/*",
        "arn:aws:sagemaker:*:*:notebook-instance/*",
        "arn:aws:sagemaker:*:*:notebook-instance-lifecycle-config/*",
        "arn:aws:sagemaker:*:*:pipeline/*",
        "arn:aws:sagemaker:*:*:pipeline/*/execution/*",
        "arn:aws:sagemaker:*:*:processing-job/*",
        "arn:aws:sagemaker:*:*:project/*",
        "arn:aws:sagemaker:*:*:training-job/*",
        "arn:aws:sagemaker:*:*:transform-job/*",
        "arn:aws:sagemaker:*:*:workforce/*",
        "arn:aws:sagemaker:*:*:workteam/*"
      ]
    },
    {
      "Sid" : "AmazonSageMakerLambdaPassRolePermission",
      "Effect": "Allow",
      "Action": [
        "iam:PassRole"
      ],
      "Resource": [
        "arn:aws:iam::*:role/service-role/AmazonSageMakerServiceCatalogProductsExecutionRole"
      ]
    },
    {
      "Sid" : "AmazonSageMakerLambdaLogPermission",
      "Effect": "Allow",
      "Action": [
        "logs:CreateLogDelivery",
        "logs:CreateLogGroup",
        "logs:CreateLogStream",
        "logs:DeleteLogDelivery",
        "logs:DescribeLogGroups",
        "logs:DescribeLogStreams",
        "logs:DescribeResourcePolicies",
        "logs:DescribeDestinations",
        "logs:DescribeExportTasks",
        "logs:DescribeMetricFilters",
        "logs:DescribeQueries",
        "logs:DescribeQueryDefinitions",
        "logs:DescribeSubscriptionFilters",
        "logs:GetLogDelivery",
        "logs:GetLogEvents",
        "logs:ListLogDeliveries",
        "logs:PutLogEvents",
        "logs:PutResourcePolicy",
        "logs:UpdateLogDelivery"
      ],
      "Resource": "arn:aws:logs:*:*:log-group:/aws/lambda/*"
    },
    {
      "Sid" : "AmazonSageMakerLambdaCodeBuildPermission",
      "Effect": "Allow",
      "Action": [
        "codebuild:StartBuild",
        "codebuild:BatchGetBuilds"
      ],
      "Resource": "arn:aws:codebuild:*:*:project/sagemaker-*",
      "Condition": {
        "StringLike": {
          "aws:ResourceTag/sagemaker:project-name": "*"
        }
      }
    }
  ]
}
```

------

## Amazon SageMaker AI 更新了 S AWS ervice Catalog AWS 托管策略
<a name="security-iam-awsmanpol-sc-updates"></a>

查看自该服务开始跟踪这些更改以来，Amazon SageMaker AI AWS 托管策略更新的详细信息。


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
|   [AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy)：更新策略  | 10 |  已更新`codestar-connections:PassConnection`和`codeconnections:PassConnection`权限。  | 2025年9月27日 | 
|   [AmazonSageMakerServiceCatalogProductsCodePipelineServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsCodePipelineServiceRolePolicy)：更新策略  | 3 |  已更新`codestar-connections:UseConnection`和`codeconnections:UseConnection`权限。  | 2025年9月27日 | 
|   [AmazonSageMakerServiceCatalogProductsCodeBuildServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsCodeBuildServiceRolePolicy)：更新策略  | 3 |  已更新`codestar-connections:UseConnection`和`codeconnections:UseConnection`权限。  | 2025年9月27日 | 
|   [AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy)：更新策略  | 9 |  添加 `cloudformation:TagResource`、`cloudformation:UntagResource` 和 `codeconnections:PassConnection` 权限。  | 2024 年 7 月 1 日 | 
| AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy -更新政策 | 7 |  将策略回滚到版本 7 (v7)。删除 `cloudformation:TagResource`、`cloudformation:UntagResource` 和 `codeconnections:PassConnection` 权限。  | 2024 年 6 月 12 日 | 
| AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy -更新政策 | 8 |  添加 `cloudformation:TagResource`、`cloudformation:UntagResource` 和 `codeconnections:PassConnection` 权限。  | 2024 年 6 月 11 日 | 
|   [AmazonSageMakerServiceCatalogProductsCodeBuildServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsCodeBuildServiceRolePolicy)：更新策略  | 2 |  添加 `codestar-connections:UseConnection` 和 `codeconnections:UseConnection` 权限。  | 2024 年 6 月 11 日 | 
|   [AmazonSageMakerServiceCatalogProductsCodePipelineServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsCodePipelineServiceRolePolicy)：更新策略  | 2 |  添加 `cloudformation:TagResource`、`cloudformation:UntagResource`、`codestar-connections:UseConnection` 和 `codeconnections:UseConnection` 权限。  | 2024 年 6 月 11 日 | 
|   [AmazonSageMakerServiceCatalogProductsLambdaServiceRole政策](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsLambdaServiceRolePolicy)：更新策略  | 2 |  添加 `codebuild:StartBuild` 和 `codebuild:BatchGetBuilds` 权限。  | 2024 年 6 月 11 日 | 
|   [AmazonSageMakerPartnerServiceCatalogProductsApiGatewayServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerPartnerServiceCatalogProductsApiGatewayServiceRolePolicy)  | 1 | 初始策略 | 2023 年 8 月 1 日 | 
|   [AmazonSageMakerPartnerServiceCatalogProductsCloudFormationServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerPartnerServiceCatalogProductsCloudFormationServiceRolePolicy)  | 1 | 初始策略 | 2023 年 8 月 1 日 | 
|   [AmazonSageMakerPartnerServiceCatalogProductsLambdaServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerPartnerServiceCatalogProductsLambdaServiceRolePolicy)  | 1 | 初始策略 | 2023 年 8 月 1 日 | 
|   [AmazonSageMakerServiceCatalogProductsGlueServiceRole政策](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsGlueServiceRolePolicy)：更新策略  | 2 |  为 `glue:GetUserDefinedFunctions` 添加权限。  | 2022 年 8 月 26 日 | 
| AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy -更新政策 | 7 |  为 `sagemaker:AddTags` 添加权限。  | 2022 年 8 月 2 日 | 
| AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy -更新政策 | 6 |  为 `lambda:TagResource` 添加权限。  | 2022 年 7 月 14 日 | 
| AmazonSageMakerServiceCatalogProductsLambdaServiceRole政策 | 1 |  初始策略  | 2022 年 4 月 22 日 | 
|   [AmazonSageMakerServiceCatalogProductsApiGatewayServiceRolePolicy](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsApiGatewayServiceRolePolicy)  | 1 |  初始策略  | 2022 年 3 月 24 日 | 
|   [AmazonSageMakerServiceCatalogProductsCloudformationServiceRole政策](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsCloudformationServiceRolePolicy)  | 1 |  初始策略  | 2022 年 3 月 24 日 | 
| AmazonSageMakerServiceCatalogProductsCodeBuildServiceRolePolicy | 1 |  初始策略  | 2022 年 3 月 24 日 | 
| AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy -更新政策 | 5 |  为 `ecr-idp:TagResource` 添加权限。  | 2022 年 3 月 21 日 | 
| AmazonSageMakerServiceCatalogProductsCodePipelineServiceRolePolicy | 1 |  初始策略  | 2022 年 2 月 22 日 | 
|   [AmazonSageMakerServiceCatalogProductsEventsServiceRole政策](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsEventsServiceRolePolicy)  | 1 |  初始策略  | 2022 年 2 月 22 日 | 
|   [AmazonSageMakerServiceCatalogProductsFirehoseServiceRole政策](#security-iam-awsmanpol-AmazonSageMakerServiceCatalogProductsFirehoseServiceRolePolicy)  | 1 |  初始策略  | 2022 年 2 月 22 日 | 
| AmazonSageMakerServiceCatalogProductsGlueServiceRole政策 | 1 |  初始策略  | 2022 年 2 月 22 日 | 
| AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy -更新政策 | 4 |  为 `cognito-idp:TagResource` 和 `s3:PutBucketCORS` 添加权限。  | 2022 年 2 月 16 日 | 
| AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy -更新政策 | 3 |  为 `sagemaker` 添加新权限。 创建、读取、更新和删除 SageMaker 图片。  | 2021 年 9 月 15 日 | 
| AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy -更新政策 | 2 |  为 `sagemaker` 和 `codestar-connections` 添加权限。 创建、读取、更新和删除代码存储库。 将 AWS CodeStar 连接传递给 AWS CodePipeline。  | 2021 年 7 月 1 日 | 
| AmazonSageMakerAdmin-ServiceCatalogProductsServiceRolePolicy | 1 | 初始策略 | 2020 年 11 月 27 日 | 

## SageMaker AWS 托管策略的 AI 更新
<a name="security-iam-awsmanpol-updates"></a>

查看自该服务开始跟踪这些更改以来， SageMaker AI AWS 托管策略更新的详细信息。


| Policy | 版本 | 更改 | 日期 | 
| --- | --- | --- | --- | 
| [AmazonSageMakerFullAccess](#security-iam-awsmanpol-AmazonSageMakerFullAccess) – 对现有策略的更新 | 27 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/sagemaker/latest/dg/security-iam-awsmanpol.html)  | 2024 年 12 月 4 日 | 
| [AmazonSageMakerFullAccess](#security-iam-awsmanpol-AmazonSageMakerFullAccess) – 对现有策略的更新 | 26 |  添加 `sagemaker:AddTags` 权限  | 2024 年 3 月 29 日 | 
| AmazonSageMakerFullAccess -更新现有政策 | 25 |  添加 `sagemaker:CreateApp`、`sagemaker:DescribeApp`、`sagemaker:DeleteApp`、`sagemaker:CreateSpace`、`sagemaker:UpdateSpace`、`sagemaker:DeleteSpace`、`s3express:CreateSession`、`s3express:CreateBucket` 和 `s3express:ListAllMyDirectoryBuckets` 权限。  | 2023 年 11 月 30 日 | 
| AmazonSageMakerFullAccess -更新现有政策 | 24 |  添加 `sagemaker-geospatial:*`、`sagemaker:AddTags`、`sagemaker-ListTags`、`sagemaker-DescribeSpace` 和 `sagemaker:ListSpaces` 权限。  | 2022 年 11 月 30 日 | 
| AmazonSageMakerFullAccess -更新现有政策 | 23 |  添加 `glue:UpdateTable`。  | 2022 年 6 月 29 日 | 
| AmazonSageMakerFullAccess -更新现有政策 | 22 |  添加 `cloudformation:ListStackResources`。  | 2022 年 5 月 1 日 | 
| [AmazonSageMakerReadOnly](#security-iam-awsmanpol-AmazonSageMakerReadOnly) – 对现有策略的更新 | 11 |  添加 `sagemaker:QueryLineage`、`sagemaker:GetLineageGroupPolicy`、`sagemaker:BatchDescribeModelPackage` 和 `sagemaker:GetModelPackageGroupPolicy` 权限。  | 2021 年 12 月 1 日 | 
| AmazonSageMakerFullAccess -更新现有政策 | 21 |  为启用了异步推理的端点添加 `sns:Publish` 权限。  | 2021 年 9 月 8 日 | 
| AmazonSageMakerFullAccess -更新现有政策 | 20 |  更新 `iam:PassRole` 资源和权限。  |  2021 年 7 月 15 日  | 
| AmazonSageMakerReadOnly -更新现有政策 | 10 |  为 AI 功能商店`BatchGetRecord`添加了新 AP SageMaker I。  | 2021 年 6 月 10 日 | 
|  |  |  SageMaker AI 开始跟踪其 AWS 托管策略的更改。  | 2021 年 6 月 1 日 | 

# 对 Amazon SageMaker AI 身份和访问进行故障排除
<a name="security_iam_troubleshoot"></a>

使用以下信息来帮助您诊断和修复在使用 A SageMaker I 和 IAM 时可能遇到的常见问题。

**Topics**
+ [我无权在 SageMaker AI 中执行操作](#security_iam_troubleshoot-no-permissions)
+ [我无权执行 `iam:PassRole`](#security_iam_troubleshoot-passrole)
+ [我想允许 AWS 账户之外的人访问我的 SageMaker AI 资源](#security_iam_troubleshoot-cross-account-access)

## 我无权在 SageMaker AI 中执行操作
<a name="security_iam_troubleshoot-no-permissions"></a>

如果 AWS 管理控制台 告诉您您无权执行某项操作，则必须联系管理员寻求帮助。管理员是向您提供登录凭证的人。

当 `mateojackson` IAM 用户尝试使用控制台查看有关训练作业的详细信息，但不具有 `sagemaker:sagemaker:DescribeTrainingJob` 权限时，会发生以下示例错误。

```
User: arn:aws:iam::123456789012:user/mateojackson is not
            authorized to perform: sagemaker:DescribeTrainingJob on resource: my-example-widget
```

在这种情况下，Mateo 请求他的管理员更新其策略，以允许他使用 `sagemaker:DescribeTrainingJob` 操作访问 `TrainingJob` 资源。

## 我无权执行 `iam:PassRole`
<a name="security_iam_troubleshoot-passrole"></a>

如果您收到错误消息，提示您无权执行`iam:PassRole`操作，则必须更新您的策略以允许您将角色传递给 SageMaker AI。

有些 AWS 服务 允许您将现有角色传递给该服务，而不是创建新的服务角色或服务相关角色。为此，您必须具有将角色传递到服务的权限。

当名为的 IAM 用户`marymajor`尝试使用控制台在 A SageMaker I 中执行操作时，会出现以下示例错误。但是，服务必须具有服务角色所授予的权限才可执行此操作。Mary 不具有将角色传递到服务的权限。

```
User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole
```

在这种情况下，必须更新 Mary 的策略以允许她执行 `iam:PassRole` 操作。

如果您需要帮助，请联系您的 AWS 管理员。您的管理员是提供登录凭证的人。

## 我想允许 AWS 账户之外的人访问我的 SageMaker AI 资源
<a name="security_iam_troubleshoot-cross-account-access"></a>

您可以创建一个角色，以便其他账户中的用户或您组织外的人员可以使用该角色来访问您的资源。您可以指定谁值得信赖，可以代入角色。对于支持基于资源的策略或访问控制列表 (ACLs) 的服务，您可以使用这些策略向人们授予访问您的资源的权限。

要了解更多信息，请参阅以下内容：
+ 要了解 SageMaker AI 是否支持这些功能，请参阅[Amazon A SageMaker I 如何与 IAM 配合使用](security_iam_service-with-iam.md)。
+ 要了解如何提供对您拥有的资源的访问权限 AWS 账户 ，请参阅 [IAM 用户*指南中的向您拥有 AWS 账户 的另一个 IAM 用户*提供访问](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_aws-accounts.html)权限。
+ 要了解如何向第三方提供对您的资源的访问[权限 AWS 账户，请参阅 *IAM 用户指南*中的向第三方提供](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html)访问权限。 AWS 账户 
+ 要了解如何通过身份联合验证提供访问权限，请参阅《IAM 用户指南》**中的[为经过外部身份验证的用户（身份联合验证）提供访问权限](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_federated-users.html)。
+ 要了解使用角色和基于资源的策略进行跨账户访问之间的差别，请参阅《IAM 用户指南》**中的 [IAM 中的跨账户资源访问](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html)。