- Newest
- Most votes
- Most comments
If there are some S3 PUTs to your GCS bucket that are successful, then it sounds like the HMAC key is configured with a service principal that has permissions to write to the GCS destination bucket. In addition to the generated recommendations, verify there are no additional GCP IAM Conditions [1] configured on the bucket principal used for the DataSync GCS location that would prevent writes. You can also verify if there are any added protection policies on specific objects or folders such as retention that would prevent object modification [2].
answered 2 years ago
The issue you're experiencing with AWS DataSync failing to transfer objects from S3 to Google Cloud Storage (GCS) with the error "S3 PutObject Failed" could be due to several reasons. Here are some potential causes and solutions to consider:
-
Permissions: Even though you mentioned not changing IAM roles, it's worth double-checking that the DataSync service still has the necessary permissions to access both the source S3 bucket and the destination GCS bucket. Ensure that the IAM role associated with DataSync has the required permissions, including s3:GetObject for the source and s3:PutObject for the destination.
-
Network connectivity: DataSync communicates with Google Cloud Storage using the Amazon S3 API. There might be a network connectivity issue between DataSync and GCS. Try restarting the DataSync agent and the task to see if it resolves the problem.
-
Transient errors: Sometimes, DataSync tasks can fail due to temporary issues. The error message "Task failed due to a transient error" is often associated with network glitches or resource constraints. In such cases, rerunning the task might resolve the issue.
-
Resource allocation: If the DataSync agent is configured with insufficient resources, it may struggle to maintain its connection with the DataSync service. Ensure that the agent meets the recommended VM requirements.
-
Object tagging: There's a known limitation when copying object tags from S3 to GCS using DataSync. If you're trying to copy object tags, this could cause the transfer to fail. To resolve this, try deselecting the "Copy object tags" option in your task settings.
-
Encryption: If your S3 bucket uses SSE-KMS encryption, make sure the IAM role has the necessary permissions (kms:Decrypt and kms:GenerateDataKey) for the corresponding KMS key.
-
Bucket policies: Check if there have been any recent changes to the bucket policies on either the source S3 bucket or the destination GCS bucket that might be restricting access.
If the problem persists after checking these potential causes, it would be advisable to contact AWS Support for further assistance, as they can provide more detailed troubleshooting based on your specific setup and logs.
Sources
Datasync : S3 to GCP sync error (SyncDaemonRestart) | AWS re:Post
Troubleshooting issues with DataSync tasks - AWS DataSync
AWS Datasync Location creation fails says: could not perform s3:GetObject in bucket, although FullS3Access is provided | AWS re:Post
answered 2 years ago
Relevant content
asked 2 years ago

Hey, Thanks you for your answer. Yes the HMAC key is configured with a service principal which has permissions to write to the GCS buckets. We only have lifecycle rules on the GCS bucket to archive objects after 3 versions, and to delete objects 90 days after archived. We run one backup daily, sometime we have 99%/100% of failure, sometime 30/60%. It's weird...
I have also checked IAM and it's okay, I have no IAM conditions, just a service with a role to access GCS services.