

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

# 變更現有檔案共享的伺服器端加密方法
<a name="edit-file-share-encryption"></a>

下列程序說明如何使用 Storage Gateway 主控台變更現有 NFS 或 SMB 檔案共享的伺服器端加密方法。若要使用 Storage Gateway 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 儲存貯體中的現有物件。  
如果您將檔案閘道設定為使用 SSE-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)。

**變更 NFS 或 SMB 檔案共享的伺服器端加密方法**

1. 前往 [https://console.aws.amazon.com/storagegateway/home](https://console.aws.amazon.com/storagegateway/) 開啟 Storage Gateway 主控台。

1. 選擇**檔案共享**，然後選擇您要變更加密方法的檔案共享。

1. 針對**動作**，選擇**編輯檔案共享加密**。

1. 針對**加密**，選擇您要用於 Amazon S3 中靜態檔案的加密類型：
   + 若要使用透過 Amazon S3 (SSE-S3) 管理的伺服器端加密，請選擇 **S3-Managed金鑰 (SSE-S3)**。如需詳細資訊，請參閱《[Amazon Simple Storage Service 使用者指南》中的搭配 Amazon S3 受管金鑰使用伺服器端加密](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingServerSideEncryption.html)。 **
   + 若要使用透過 AWS Key Management Service (SSE-KMS) 管理的伺服器端加密，請選擇 **KMS 受管金鑰 (SSE-KMS)**。對於**主要 KMS 金鑰**，請選擇現有的 AWS KMS 金鑰，或選擇**建立新的 KMS 金鑰**，以在 AWS Key Management Service (AWS KMS) 主控台中建立新的 KMS 金鑰。

     如需 的詳細資訊 AWS KMS，請參閱《 *AWS Key Management Service 開發人員指南*》中的 [Key AWS Management Service？](https://docs.aws.amazon.com/kms/latest/developerguide/overview.html)。
   + 若要使用透過 AWS Key Management Service (DSSE-KMS) 管理的雙層伺服器端加密，請選擇**具有 AWS Key Management Service 金鑰的雙層伺服器端加密 (DSSE-KMS)**。對於**主要 KMS 金鑰**，請選擇現有的 AWS KMS 金鑰，或在 AWS Key Management Service (AWS KMS) 主控台中選擇**建立新的 KMS 金鑰**以建立新的 KMS 金鑰。

     如需 DSSE-KMS 的詳細資訊，請參閱《*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/)。  
若要使用未列出的別名指定 AWS KMS 金鑰，或使用來自不同 AWS 帳戶的 AWS KMS 金鑰，您必須使用 AWS Command Line Interface。不支援非對稱 KMS 金鑰。如需詳細資訊，請參閱 *AWS Storage Gateway API 參考*中的 [CreateSMBFileShare](https://docs.aws.amazon.com/storagegateway/latest/APIReference/API_CreateSMBFileShare.html)。

1. 完成後，請選擇**儲存變更**。