This post covers one job: copying a Google Cloud Storage bucket into Amazon S3 with AWS DataSync. If you are moving more than buckets, such as databases, VMs, Kubernetes clusters and DNS, start with our GCP to AWS migration guide, step by step, which also compares DataSync with rclone and a VM-based copy.
How DataSync reads from Cloud Storage
DataSync has no Google-specific connector. It treats Cloud Storage as generic object storage: it connects to storage.googleapis.com through Cloud Storage's S3-compatible XML API, authenticates as a Google service account, and writes the objects to S3.
Enhanced or Basic mode
Every DataSync task runs in one of two modes, and you cannot change the mode after creating the task:
- Enhanced mode lists, prepares, transfers and verifies data in parallel, handles virtually unlimited object counts, and gives more detailed metrics and structured logs. For Cloud Storage to S3 it does not need an agent: DataSync connects to Google directly. Since May 2025 this is the simplest route for most bucket copies.
- Basic mode works through the same steps one after another, is subject to quotas on the number of objects per task execution, and always needs an agent for Cloud Storage.
You still need an agent in Enhanced mode if you want the transfer to run over private connectivity rather than public endpoints, or if the destination is Amazon EFS or FSx rather than S3. Check the DataSync pricing page for both modes before you choose; the charges differ.
Prerequisites
- An AWS account with permission to use DataSync, S3 and IAM, plus EC2 if an agent will run there. Creating an Enhanced mode task needs
iam:CreateServiceLinkedRole. - The AWS CLI, if you prefer scripting to the console.
- The Cloud Storage bucket you want to copy, and permission to create HMAC keys or set up workload identity federation in that project.
- If you use an agent, outbound HTTPS from it to both
storage.googleapis.comand the DataSync service endpoints.
Step 1: Give DataSync read access to the bucket
Create or pick a service account with read access to the bucket; Storage Object Viewer is enough for a source. There are two ways to let DataSync act as it:
- HMAC key (both modes). In the Cloud Storage settings, under Interoperability, create an HMAC key for the service account. You get an access ID and a secret; Google shows the secret only once. You can type the secret into DataSync or store it in AWS Secrets Manager and point DataSync at it, which is the better habit.
- Workload identity federation (Enhanced mode only). Instead of a long-lived key, DataSync assumes an IAM role, gets a signed token from AWS STS, and exchanges it with Google's STS for a short-lived access token. This takes more setup on both sides: an IAM role, outbound web identity federation enabled for the AWS account, and a Google workload identity pool with an OIDC provider that trusts it. It is worth it if your security team does not want long-lived keys.
Step 2: Create the S3 destination bucket
Create the destination bucket in the region where the data will be used. Keep Block Public Access on, choose encryption, and enable versioning if you need it. Note the bucket's ARN for the next step.
Step 3: Create an IAM role for DataSync
DataSync needs a role it can assume to write to the bucket. Create a role trusted by datasync.amazonaws.com with a policy that allows listing the bucket and reading, writing and deleting objects in it. The DataSync console can generate this role for you when you create the S3 location; if you build it yourself, scope it to the one bucket.
Step 4: Deploy an agent, if you need one
Skip this step for an Enhanced mode transfer to S3 over public endpoints. Otherwise, deploy an agent that matches the task mode (Enhanced and Basic agents are different images):
- In Google Cloud. Download the agent image from the DataSync console, import it as a Compute Engine image and start a VM from it. AWS's guide suggests e2-standard-8 for up to 20 million objects per task execution and e2-standard-16 above that. Traffic goes to AWS over public endpoints, encrypted with TLS.
- In your AWS VPC. Launch an EC2 instance from the DataSync agent AMI in the same region as the bucket, using one of AWS's recommended instance types, with a DataSync VPC interface endpoint so the transfer to AWS stays private.
Activate the agent from the DataSync console. Activation retrieves a key from the agent over port 80, so allow that from wherever you run the activation; it does not need to be open to the internet, and DataSync closes it afterwards.
Step 5: Create the source and destination locations
Source: Object storage location
In DataSync, create a location of type Object storage. Set:
- Server:
storage.googleapis.com - Bucket name: your GCS bucket, plus an optional folder prefix
- Agent: leave it unset for an agentless Enhanced mode transfer, or choose the agent from Step 4
- Protocol and port: HTTPS on 443
- Authentication: the HMAC access ID as the access key and the HMAC secret (or its Secrets Manager secret) as the secret key, or the federated identity settings from Step 1
Destination: Amazon S3 location
Create an S3 location pointing at the bucket from Step 2, pick the storage class, and select the IAM role from Step 3.
Step 6: Create and run the task
Create a task with the Object storage location as the source and the S3 location as the destination, choose the task mode, then review the options:
- Object tags: turn off Copy object tags. Cloud Storage's XML API does not support object tags; an Enhanced mode task fails straight away if the option is left on, and a Basic mode task reports failures for tagged objects.
- Verification: Enhanced mode verifies the data it transfers. Basic mode verifies all data by default, and lets you verify only the transferred data or skip verification.
- Overwrite and deletion: choose whether to overwrite changed objects and whether to keep objects in S3 that no longer exist in the source.
- Filters or a manifest: include or exclude patterns to copy one prefix at a time or skip temporary files, or a manifest listing exactly which objects to copy.
- Bandwidth limit: cap throughput if an agent shares a link with production traffic.
- Logging and reports: send logs to CloudWatch and enable task reports, so you have a per-object record of what was transferred, skipped or failed.
- Schedule: optional; useful for repeated incremental syncs before cutover.
Start the task. Later runs only copy what changed, which is how you close the gap before the final cutover.
Step 7: Verify the copy
Check the task execution status and the task report for failed or skipped objects. Then compare object counts and total bytes per prefix between the two buckets, and spot-check that metadata such as Content-Type came across. Re-run the task after the final write freeze, verify again, and only then point applications at S3.
Performance and cost
Throughput depends on the task mode, the network path and object sizes; many small files are slower than a few large ones because each object carries per-request overhead. Enhanced mode parallelizes listing and transfer itself. In Basic mode, splitting a very large bucket into several tasks with include filters on different prefixes, each with its own agent, lets you run them in parallel.
The cost has several parts. Google bills egress for every byte leaving Cloud Storage, which is usually the largest item for big buckets. DataSync charges for the data it copies, at rates that depend on the task mode. Cloud Storage charges for read operations and S3 for write requests, which adds up with very high object counts. An agent VM costs money while it runs, so stop or delete it when the migration is finished. Run a small task first and extrapolate before copying everything. If you are leaving Google Cloud entirely, read about Google's exit waiver in the GCP to AWS migration guide.
Conclusion
With Enhanced mode, DataSync no longer needs an agent for a Cloud Storage to S3 copy, and for large buckets its incremental runs, verification and task reports are worth the per-GB charge. For the rest of the move, including service mapping, the AWS landing zone, databases, compute and DNS cutover, see the GCP to AWS migration guide and how to choose cloud migration planning tools, or our cloud migration services for a larger move.