

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 加密檔案閘道存放在 Amazon S3 中的物件
<a name="encrypt-objects-stored-by-file-gateway-in-amazon-s3"></a>

S3 File Gateway 支援下列伺服器端加密方法，用於存放於 Amazon S3 中的資料：
+ **SSE-S3** — 根據預設，上傳至 Amazon S3 儲存貯體的所有新物件都會使用伺服器端加密搭配 Amazon S3 受管金鑰。如需詳細資訊，請參閱《[Amazon Simple Storage Service 使用者指南》中的搭配 Amazon S3 受管金鑰使用伺服器端加密](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingServerSideEncryption.html)。 **
+ **SSE-KMS** — 您可以將檔案共享設定為使用伺服器端加密與 AWS Key Management Service (AWS KMS) 受管金鑰。 AWS KMS 是一種服務，結合了安全、高可用性的硬體和軟體，以提供針對雲端擴展的金鑰管理系統。如需詳細資訊，請參閱《 *AWS Key Management Service 開發人員指南*》中的 [Key AWS Management Service？](https://docs.aws.amazon.com/kms/latest/developerguide/overview.html)。
+ **DSSE-KMS** — 雙層伺服器端加密與 AWS KMS 金鑰，會在物件上傳至 Amazon S3 時套用兩層加密。這有助於滿足多層加密的合規標準。如需詳細資訊，請參閱《*Amazon Simple Storage Service 使用者指南*》中的[使用雙層伺服器端加密搭配 AWS KMS 金鑰](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingDSSEncryption.html)。
**注意**  
使用 DSSE-KMS 和 AWS KMS 金鑰需支付額外費用。如需詳細資訊，請參閱 [AWS KMS 定價](https://aws.amazon.com/kms/pricing/)。

您可以使用 Storage Gateway 主控台或 Storage Gateway API，在建立新的檔案共享時指定加密方法。如需主控台程序，請參閱 [使用自訂組態建立 NFS 檔案共享](CreatingAnNFSFileShare.md)或 [使用自訂組態建立 SMB 檔案共享](CreatingAnSMBFileShare.md)。如需對應 API 命令的資訊，請參閱 *AWS Storage Gateway API 參考*中的 [CreateNFSFileShare](https://docs.aws.amazon.com/storagegateway/latest/APIReference/API_CreateNFSFileShare.html) 或 [CreateSMBFileShare](https://docs.aws.amazon.com/storagegateway/latest/APIReference/API_CreateSMBFileShare.html)。



您也可以使用 Storage Gateway 主控台或 Storage Gateway API 更新現有檔案共享的加密設定。如需主控台程序，請參閱 [變更現有檔案共享的伺服器端加密方法](edit-file-share-encryption.md)。如需對應 API 命令的資訊，請參閱 *AWS Storage Gateway API 參考*中的 [UpdateNFSFileShare](https://docs.aws.amazon.com/storagegateway/latest/APIReference/API_UpdateNFSFileShare.html) 或 [UpdateSMBFileShare](https://docs.aws.amazon.com/storagegateway/latest/APIReference/API_UpdateSMBFileShare.html)。

**注意**  
更新加密方法之後，閘道會針對其在 Amazon S3 中建立的所有新物件，以及其未來更新或修改的任何儲存物件，使用新的方法。現有的 Amazon S3 物件只有在閘道更新或修改時才會收到新的加密方法。

**重要**  
請確定您的檔案共享使用與其存放資料的 Amazon S3 儲存貯體相同的加密類型。  
如果您將檔案閘道設定為使用 SSE-KMS 或 DSSE-KMS 進行加密，則必須手動將 `kms:Encrypt`、`kms:GenerateDataKey`、、 `kms:Decrypt` `kms:ReEncrypt*`和 `kms:DescribeKey`許可新增至與檔案共用相關聯的 IAM 角色。如需詳細資訊，請參閱[針對 Storage Gateway 使用以身分為基礎的政策 (IAM 政策）](https://docs.aws.amazon.com/filegateway/latest/files3/using-identity-based-policies.html)。