使用密 Amazon KMS 钥配置共享存储加密 - Amazon ParallelCluster
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

使用密 Amazon KMS 钥配置共享存储加密

了解如何设置客户托管 Amazon KMS 密钥来加密和保护您在为其配置的集群文件存储系统中的数据 Amazon ParallelCluster。

使用 Amazon ParallelCluster 命令行界面 (CLI) 或 API 时,您只需为创建或更新 Amazon ParallelCluster 映像和集群时创建的 Amazon 资源付费。有关更多信息,请参阅 Amazon 使用的服务 Amazon ParallelCluster

Amazon ParallelCluster 用户界面基于无服务器架构构建,在大多数情况下,您可以在 Amazon 免费套餐类别中使用它。有关更多信息,请参阅 Amazon ParallelCluster UI 成本

Amazon ParallelCluster 支持以下共享存储配置选项:

您可以使用这些选项为 Amazon EBS、Amazon EFS 和 FSx for Lustre 共享存储系统加密提供客户托管 Amazon KMS 密钥。要使用这些选项,您必须为以下各项创建并配置 IAM 策略:

先决条件

创建策略

创建策略。
  1. 转到 IAM 控制台:https://console.aws.amazon.com/iam/home

  2. 选择策略

  3. 选择创建策略

  4. 选择 JSON 选项卡,然后粘贴以下策略。请务必将所有出现的123456789012替换为您的 Amazon Web Services 账户 ID 和密钥 Amazon 资源名称 (ARN) 以及 Amazon Web Services 区域 您自己的名称。

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "kms:DescribeKey", "kms:ReEncrypt*", "kms:CreateGrant", "kms:Decrypt" ], "Resource": [ "arn:aws:kms:region-id:123456789012:key/abcd1234-ef56-gh78-ij90-abcd1234efgh5678" ] } ] }
  5. 对于本教程,将策略命名为 ParallelClusterKmsPolicy,然后选择创建策略

  6. 记下策略 ARN。您需要用它来配置您的集群。

配置和创建集群

下面是一个示例集群配置,其中包括带加密功能的 Amazon Elastic Block Store 共享文件系统。

Region: eu-west-1 Image: Os: alinux2 HeadNode: InstanceType: t2.micro Networking: SubnetId: subnet-abcdef01234567890 Ssh: KeyName: my-ssh-key Iam: AdditionalIamPolicies: - Policy: arn:aws:iam::123456789012:policy/ParallelClusterKmsPolicy Scheduling: Scheduler: slurm SlurmQueues: - Name: q1 ComputeResources: - Name: t2micro InstanceType: t2.micro MinCount: 0 MaxCount: 10 Networking: SubnetIds: - subnet-abcdef01234567890 Iam: AdditionalIamPolicies: - Policy: arn:aws:iam::123456789012:policy/ParallelClusterKmsPolicy SharedStorage: - MountDir: /shared/ebs1 Name: shared-ebs1 StorageType: Ebs EbsSettings: Encrypted: True KmsKeyId: abcd1234-ef56-gh78-ij90-abcd1234efgh5678

将红色文本项目替换为您自己的值。然后,创建一个使用您的 Amazon KMS 密钥对 Amazon EBS 中的数据进行加密的集群。

Amazon EFS 和 FSx for Lustre 文件系统的配置与此类似。

Amazon EFS SharedStorage 配置如下。

... SharedStorage: - MountDir: /shared/efs1 Name: shared-efs1 StorageType: Efs EfsSettings: Encrypted: True KmsKeyId: abcd1234-ef56-gh78-ij90-abcd1234efgh5678

FSx for Lustre SharedStorage 配置如下。

... SharedStorage: - MountDir: /shared/fsx1 Name: shared-fsx1 StorageType: FsxLustre FsxLustreSettings: StorageCapacity: 1200 DeploymentType: PERSISTENT_1 PerUnitStorageThroughput: 200 KmsKeyId: abcd1234-ef56-gh78-ij90-abcd1234efgh5678