By using AWS re:Post, you agree to the Terms of Use
/why files became 0kb when using datasync between s3 classes/

why files became 0kb when using datasync between s3 classes


using datasync, I transferred the files in Glacier Deep Archive to the s3 Glacier Flexible Retrieval class in the same s3 bucket, but now all files are 0 kb and appear in STANDARD class.

Files transferred 132952

Data transferred 20.26 MiB(actually it should be much higher)

I did not take any action in the bucket beforehand, did I miss something or did something wrong?

1 Answers


If your objects are currently residing in Glacier Deep Archive, you must restore objects archived in this storage class before DataSync can read them. You can read more about the consideration for working with different S3 storage classes at below link:

For restoring objects, the following documentation is very helpful

There is a FAQ around this (

Q: Can I copy data out of Amazon S3 Glacier Flexible Retrieval (formerly S3 Glacier) and Amazon S3 Glacier Deep Archive?

A: When using S3 as the source location for an AWS DataSync task, the service will attempt to retrieve all objects from the bucket which need to be copied to the destination. Retrieving objects which are archived in the S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage class results in an error. Any errors retrieving archived objects will be logged by DataSync and will result in a failed task completion status. Read about considerations when working with Amazon S3 storage classes in our documentation.

answered 16 days ago
  • thank you but when i run datasync i didn't get any error. number of transferred files is correct but transferred file size is wrong. now all files appear as 0kb in STANDARD. Could the files be overridden and their contents deleted?

  • Files in S3 Glacier Deep Archive don't get deleted unless they are removed by the user. If that operation was not performed, the objects in GDA can be restored using instructions from above link. Once you have restored the objects, you need to copy them to the class of your choice (when you restore it's a temporary copy and you have to specify for how many days the temporary copy should be kept). Try it with one of the object in GDA to get a feel of the process.

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.

Guidelines for Answering Questions