技術部落格

集結國內外精選文章,掌握最新雲端技術新知與應用

iKala Cloud / 資料管理與分析 / 【GCP 教學】如何快速將資料從 AWS S3 搬遷到 GCP Storage?

【GCP 教學】如何快速將資料從 AWS S3 搬遷到 GCP Storage?

簡單幾步驟帶您快速把資料從 AWS 搬遷到 GCP

工作流程

1. 在 AWS 建立 IAM User & Access Key
2. 在 Cloud Storage 建立 Bucket
3. 設定 Transfer Job

1. 建立 IAM User & Access Key

Google Cloud Storage 提供 Transfer Job 快速匯入資料,其中最方便的就是從 AWS S3 傳資料,首要步驟提供 Access Key,讓 Cloud Storage 執行 Job.
1. 建立 IAM User
2. 設定 IAM Policy,這邊設定 AmazonS3ReadOnlyAccess 這個權限
3. 產生一組 Access Key 和 Secret Key

1.1 AWS Console -> Services -> IAM -> Add User

建立一個 IAM User,提供傳輸資料。

 data-lazy-src=

這裡 IAM User 範例名稱為: aws-s3-to-gcp,需要 Access Key,所以 Access Type 選擇 Programmatic access

 data-lazy-src=

使用 AWS 預設的 Policy:
1. 選擇 Attach existing policies directly
2. 搜尋 S3
3. 選擇 AmazonS3ReadOnlyAccess. 如果要允許傳輸完畢之後,刪除 Object,那就選擇 AmazonS3FullAccess

 data-lazy-src=

 data-lazy-src=

建立 IAM 帳號,把 Access Key 和 Secret Access Key 存下來。

注意:Secret Access Key 只能看到一次,畫面關閉後,不能再查閱。

 data-lazy-src=

2.1 GCP Console -> Storage -> Browser

在 GCP Console 找到 Storage

 data-lazy-src=

 data-lazy-src=

 data-lazy-src=

3.1 GCP Console -> Storage -> Transfer

 data-lazy-src=

填入 S3 資訊:
• Bucket Name
• Access Key
• Secret Access Key

 data-lazy-src=

選擇目標,這邊範例為 aws-gtcafe-us-east-2-temp-data。

如果想設定移轉完成後,刪除來源的 Object (如下圖),那 IAM Policy 就要選AmazonS3FullAccess

 data-lazy-src=

設定傳輸的週期,一次性、還是固定週期。設定完成後就會開始從 S3 傳資料到 Cloud Storage。

 data-lazy-src=

下圖是 Google Cloud Platform for AWS Professionals: Storage  比較 Cloud Storage 和 S3。

 data-lazy-src=

• Experience GCP
• Study Notes – AWS S3

參考資料

• Google Cloud Storage
• Amazon Simple Storage Service (S3) » Developer Guide
• Google Cloud Platform for AWS Professionals: Storage 

(本文來自合作部落客 Rick:Complete Think,GCP 專門家授權轉載。)

 

分享本文:
FacebookLineTwitter
回到頂端