

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

# 將資料從 Amazon S3 匯入 RDS for PostgreSQL 資料庫執行個體
<a name="USER_PostgreSQL.S3Import"></a>

您可以將使用 Amazon Simple Storage Service 儲存的資料匯入 RDS for PostgreSQL 資料庫執行個體。要執行此操作，您首先安裝 RDS for PostgreSQL `aws_s3` 擴充功能。此擴充功能提供可用於從 Amazon S3 儲存貯體匯入資料的函數。*儲存貯體*是物件或檔案的 Amazon S3 容器。資料可以是逗號分隔值 (CSV) 檔案、文字檔案或壓縮 (gzip) 檔案。從下文中，您可以了解如何安裝擴充功能，以及如何將資料從 Amazon S3 匯入資料表。

您的資料庫必須執行 PostgreSQL 10.7 版或更高版本，才能從 Simple Storage Service (Amazon S3) 匯入 RDS for PostgreSQL。

如果您沒有資料儲存於 Amazon S3 上，您需要先建立儲存貯體並儲存資料。如需詳細資訊，請參閱《*Amazon Simple Storage Service 使用者指南*》中的下列主題：
+ [建立儲存貯體](https://docs.aws.amazon.com/AmazonS3/latest/userguide/GetStartedWithS3.html#creating-bucket)
+ [將物件新增到儲存貯體](https://docs.aws.amazon.com/AmazonS3/latest/userguide/GetStartedWithS3.html#uploading-an-object-bucket) 

支援從 Amazon S3 匯入跨帳戶。如需更多詳細資訊，請參閱《Amazon Simple Storage Service 使用者指南》**中的[授予跨帳戶許可](https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-walkthroughs-managing-access-example2.html)。

從 S3 匯入資料時，您可以使用客戶受管金鑰進行加密。如需詳細資訊，請參閱《Amazon Simple Storage Service 使用者指南》**中的 [儲存在 AWS KMS中的 KMS 金鑰](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html)。

**Topics**
+ [安裝 aws\_s3 擴充功能](USER_PostgreSQL.S3Import.InstallExtension.md)
+ [從 Amazon S3 資料匯入資料的概觀](USER_PostgreSQL.S3Import.Overview.md)
+ [設定對 Amazon S3 儲存貯體的存取權](USER_PostgreSQL.S3Import.AccessPermission.md)
+ [將資料從 Amazon S3 匯入 RDS for PostgreSQL 資料庫執行個體](USER_PostgreSQL.S3Import.FileFormats.md)
+ [函數參考](USER_PostgreSQL.S3Import.Reference.md)