亚马逊 EM Amazon IAM Identity Center R 集成入门 - Amazon EMR
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

亚马逊 EM Amazon IAM Identity Center R 集成入门

本节将帮助您配置要与之集成的亚马逊 EMR。 Amazon IAM Identity Center

创建 Identity Center 实例

如果您还没有实例,请在您要启动 EMR 集群的 Amazon Web Services 区域 中创建一个 Identity Center 实例。Identity Center 实例只能存在于 Amazon Web Services 账户的单个区域中。

使用以下 Amazon CLI 命令创建一个名为的新实例MyInstance

aws sso-admin create-instance --name MyInstance

为 Identity Center 创建 IAM 角色

要将 Amazon EMR 与集成 Amazon IAM Identity Center,请创建一个 IAM 角色,该角色可以从 EMR 集群中使用身份中心进行身份验证。在幕后,Amazon EMR 使用 SigV4 凭证将 Identity Center 身份中继到下游服务,例如 Amazon Lake Formation。您的角色还应当具有调用下游服务的相应权限。

创建角色时,请使用下面的权限策略:

{ "Statement": [ { "Sid": "IdCPermissions", "Effect": "Allow", "Action": [ "sso-oauth:*" ], "Resource": "*" }, { "Sid": "GlueandLakePermissions", "Effect": "Allow", "Action": [ "glue:*", "lakeformation:GetDataAccess" ], "Resource": "*" }, { "Sid": "AccessGrantsPermissions", "Effect": "Allow", "Action": [ "s3:GetDataAccess", "s3:GetAccessGrantsInstanceForPrefix" ], "Resource": "*" } ] }

该角色的信任策略允许 InstanceProfile 角色让其代入角色。

{ "Sid": "AssumeRole", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::12345678912:role/EMR_EC2_DefaultRole" }, "Action": [ "sts:AssumeRole", "sts:SetContext" ] }

创建启用 Identity Center 的安全配置

要启动 EMR 集群与 IAM Identity Center 的集成,请使用以下示例命令创建启用了 Identity Center 的 Amazon EMR 安全配置。下文对每种配置进行说明。

aws emr create-security-configuration --name "IdentityCenterConfiguration-with-lf-accessgrants" --region "us-west-2" --security-configuration '{ "AuthenticationConfiguration":{ "IdentityCenterConfiguration":{ "EnableIdentityCenter":true, "IdentityCenterApplicationAssigmentRequired":false, "IdentityCenterInstanceARN": "arn:aws:sso:::instance/ssoins-123xxxxxxxxxx789", "IAMRoleForEMRIdentityCenterApplicationARN": "arn:aws:iam::123456789012:role/tip-role" } }, "AuthorizationConfiguration": { "LakeFormationConfiguration": { "EnableLakeFormation": true } }, "EncryptionConfiguration": { "EnableInTransitEncryption": true, "EnableAtRestEncryption": false, "InTransitEncryptionConfiguration": { "TLSCertificateConfiguration": { "CertificateProviderType": "PEM", "S3Object": "s3://my-bucket/cert/my-certs.zip" } } } }'
  • EnableIdentityCenter –(必需)启用 Identity Center 集成。

  • IdentityCenterApplicationARN –(必需)Identity Center 实例 ARN。

  • IAMRoleForEMRIdentityCenterApplicationARN –(必需)从集群购买 Identity Center 令牌的 IAM 角色。

  • IdentityCenterApplicationAssignmentRequired –(布尔值)管理是否需要分配才能使用 Identity Center 应用程序。默认值为 true

  • AuthorizationConfiguration/LakeFormationConfiguration—(可选)配置授权:

    • EnableLakeFormation – 在集群上启用 Lake Formation 授权。

要启用 Identity Center 与 Amazon EMR 的集成,您必须指定 EncryptionConfigurationIntransitEncryptionConfiguration

创建并启动启用了 Identity Center 的集群

现在,您已经设置了通过 Identity Center 进行身份验证的 IAM 角色,并创建了启用 Identity Center 的 Amazon EMR 安全配置,您可以创建和启动您的身份感知集群。有关使用所需的安全配置启动集群的步骤,请参阅 为集群指定安全配置

或者,如果您想将启用了 Identity Center 的集群与 Amazon EMR 支持的其他安全选项一起使用,请参阅以下部分: