

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

# Amazon EFS 的加密最佳实践
<a name="efs"></a>

[Amazon Elastic File System（Amazon EFS）](https://docs.aws.amazon.com/efs/latest/ug/whatisefs.html)可帮助您在 AWS 云中创建和配置共享文件系统。

考虑下面针对该服务的加密最佳实践：
+ 在中 AWS Config，实施[efs-encrypted-check](https://docs.aws.amazon.com/config/latest/developerguide/efs-encrypted-check.html) AWS 托管规则。此规则检查 Amazon EFS 是否配置为使用加密文件数据 AWS KMS。
+ 通过创建 Amazon 警报来强制加密 Amazon EFS 文件系统，该 CloudWatch 警报监控`CreateFileSystem`事件 CloudTrail 日志，并在创建未加密文件系统时触发警报。有关更多信息，请参阅 [Walkthrough: Enforcing Encryption on an Amazon EFS File System at Rest](https://docs.aws.amazon.com/efs/latest/ug/efs-enforce-encryption.html)。
+ 使用 [EFS 挂载帮助程序](https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html)挂载文件系统。这将在客户端和 Amazon EFS 服务之间建立和维护 TLS 1.2 隧道，并通过这个加密隧道路由所有网络文件系统（NFS）流量。以下命令实现了使用 TLS 进行传输中加密。

  ```
  sudo mount -t efs  -o tls file-system-id:/ /mnt/efs
  ```

  有关更多信息，请参阅 [Using EFS mount helper to mount EFS file systems](https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html)。
+ 使用 AWS PrivateLink、实现接口 VPC 终端节点，在 VPCs 和 Amazon EFS API 之间建立私有连接。通过 VPN 连接传入和传出端点的传输中数据会被加密。有关更多信息，请参阅 [Access an AWS 服务 using an interface VPC endpoint](https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html)。
+ 在基于 IAM 身份的策略中使用 `elasticfilesystem:Encrypted` 条件键可防止用户创建未加密的 EFS 文件系统。有关更多信息，请参阅 [Using IAM to enforce creating encrypted file systems](https://docs.aws.amazon.com/efs/latest/ug/using-iam-to-enforce-encryption-at-rest.html)。
+ 使用基于资源的密钥政策将用于 EFS 加密的 KMS 密钥配置为最低权限访问。
+ 在 EFS 文件系统策略中使用 `aws:SecureTransport` 条件键，强制 NFS 客户端在连接 EFS 文件系统时使用 TLS。有关更多信息，请参阅使用 *Amazon Elastic File System 加密文件数据*[中的传输](https://docs.aws.amazon.com/whitepapers/latest/efs-encrypted-file-systems/encryption-of-data-in-transit.html)数据加密（AWS 白皮书）。