Skip to content

Datasync: Full S3 PutObjectFailed errors

0

Hello,

We have a daily datasync job which is orchestrated using Lambdas and AWS API. The source locations are AWS S3 buckets and the target locations are GCP cloud storage buckets. However recently we started getting an error on datasync tasks (It worked fine before) with a lot of failed transfers due to the error "S3 PutObject Failed":

[ERROR] Deferred error: s3:c68 close("s3://target-bucket/some/path/to/file.jpg"): 40978 (S3 Put Object Failed)

I didn't change anything in IAM roles etc. I don't understand why It just stopped working. Some S3 PUT works but the majority fail

Did anyone run into the same issue ?

2 Answers
0

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].

[1] https://cloud.google.com/iam/docs/conditions-overview

[2] https://cloud.google.com/storage/docs/bucket-lock

AWS

answered 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.

0

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.