我想要使用 Amazon Simple Storage Service (Amazon S3) 儲存貯體作為 AWS Database Migration Service (AWS DMS) 的目標。我的資源位於同一個帳戶。
簡短說明
在您建立複寫執行個體之後,請完成下列步驟,以將 S3 儲存貯體作為 AWS DMS 的目標端點:
- 建立 S3 儲存貯體。
- 建立 AWS Identity and Access Management (IAM) 政策。
- 建立角色。
- 建立您的目標端點。
如需詳細資訊,請參閱將 Amazon S3 作為 AWS Database Migration Service 的目標使用。
解決方法
建立 S3 儲存貯體
- 開啟 Amazon S3 主控台,然後建立儲存貯體。
- 選取您建立的儲存貯體,然後選擇 Create folder (建立資料夾)。
- 輸入資料夾名稱,然後選擇 Save (儲存)。
建立 IAM 政策
1. 開啟 IAM console (IAM 主控台),然後從導覽窗格中選擇 Policies (政策)。
2. 選擇 Create policy (建立政策),然後選擇 JSON (JSON)。
3. 新增類似下列範例的 IAM 政策:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:DeleteObject",
"s3:PutObjectTagging"
],
"Resource": [
"arn:aws:s3:::bucketname/*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::bucketname*"
]
}
]
}
**注意:**將 bucketname 替換為您的儲存貯體名稱。
4. 選擇 Review policy (檢閱政策),輸入 Name (名稱) 和 Description (說明),然後選擇 Create policy (建立政策)。
建立角色
- 開啟 IAM console (IAM 主控台),然後從導覽窗格中選擇 Roles (角色)。
- 選擇 Create role (建立角色),選擇 DMS,然後選擇 Next: Permissions (下一步:權限)。
- 在 Create role (建立角色) 窗格中,於 Search (搜尋) 欄位選擇您建立的政策,然後選擇 Next: tags (下一步:標籤)。
- 選擇 Next: Review (下一步:檢閱)。
- 輸入 Role name (角色名稱) 和 Role description (角色說明)。
- 選擇 Create role (建立角色)。記下 Role ARN。
建立您的目標端點
- 開啟 AWS DMS console (AWS DMS 主控台),然後從導覽窗格中選擇 Endpoints (端點)。
- 選擇 Create endpoint (建立端點),然後選取 Target endpoint (目標端點)。
- 輸入 Endpoint identifier (端點識別碼),然後在 Target engine (目標引擎) 中選擇 Amazon S3。
- 將您複製的 Role ARN (角色 ARN) 貼到 Service Access Role ARN (服務存取角色 ARN) 欄位。
- 輸入 Bucket name (儲存貯體名稱) 和 Bucket folder (儲存貯體資料夾)。
- 在 Endpoint settings (端點設定) 下,如有需要,新增您的 Endpoint settings (端點設定)。如需詳細資訊,請參閱使用 Amazon S3 作為 AWS DMS 目標時的端點設定。
- (選用) 在 Test endpoint connection (測試端點連線) 下,選取您的虛擬私有雲端 (VPC) 和 Replication instance (複寫執行個體),然後選擇 Run test (執行測試)。
**注意:**您的 VPC 可能需要支援 AWS DMS 版本 3.4.7。如需詳細資訊,請參閱遷移至 AWS DMS 3.4.7 及更新版本時,誰會受到影響?
- 選擇 Create endpoint (建立端點)。
相關資訊
將 Amazon S3 作為 AWS DMS 的來源使用
使用 AWS DMS 複寫執行個體
在 AWS Database Migration Service 中疑難排解遷移任務