本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
使用配置共享存储加密Amazon KMS密钥
了解如何设置客户托管Amazon KMS密钥,用于加密和保护配置为的群集文件存储系统中的数据Amazon ParallelCluster.
Amazon ParallelCluster支持配置选项:
您可以使用这些选项为客户提供托管Amazon KMS用于 Lustre 共享存储系统加密的 Amazon EBS、Amazon EFS 和 FSx 的密钥。要使用它们,您必须为以下目标创建并配置 IAM 策略:
创建 策略
创建策略。
-
转到 IAM 控制台:https://console.aws.amazon.com/iam/home
. -
选择策略。
-
选择 Create policy(创建策略)。
-
选择JSON选项卡,然后粘贴以下策略。请务必替换所有匹配项
和您的Amazon您自己的账户 ID 以及 Amazon 资源名称 (ARN) 和区域。123456789012
{ "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
" ] } ] } -
对于本教程,将策略命名为
ParallelClusterKmsPolicy
选择,然后选择创建策略. -
记录策略 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密钥用于在亚马逊 EBS 中加密您的数据。
对于 Lustre 文件系统,Amazon EFS 和 FSx 的配置类似。
Amazon EFSSharedStorage
配置:
... SharedStorage: - MountDir: /shared/
efs1
Name:shared-efs1
StorageType: Efs EfsSettings: Encrypted: True KmsKeyId:abcd1234-ef56-gh78-ij90-abcd1234efgh5678
FSx for LustreSharedStorage
配置:
... SharedStorage: - MountDir: /shared/
fsx1
Name:shared-fsx1
StorageType: FsxLustre FsxLustreSettings: StorageCapacity:1200
DeploymentType:PERSISTENT_1
PerUnitStorageThroughput:200
KmsKeyId:abcd1234-ef56-gh78-ij90-abcd1234efgh5678