Is a partial target file created if an error occurs during AWS S3 copy?

Viewed 97

What happens to the target file (i.e. the file being written) if an error occurs during the copy-operation on AWS S3? The API documentation states this;

You create a copy of your object up to 5 GB in size in a single atomic action using this API

Does that mean that for files < 5 GB in size, no partial target file will be written/visible?

1 Answers

Objects will never be in a 'partial' in S3. Either the whole file is available, or none of it is.

If the file is less than 5GB, it can be uploaded with a normal upload command. If it works, then it appears. If it fails, then there is no change on S3.

Larger files need Uploading and copying objects using multipart upload - Amazon Simple Storage Service. This uploads the file in 'parts', and each part can be retried. When all parts are uploaded, a final command tells S3 to join the parts into one Object.

Related