tags:

views:

145

answers:

1

We're uploading files to a temporary folder in a bucket. After that, we're trying to copy the uploaded files to its actual folder then delete the files in the temporary folder. It doesn't timeout when working with a single file. We're using the ThreeSharp API.

Stack Trace:

[WebException: The operation has timed out] System.Net.HttpWebRequest.GetRequestStream() +5322142 Affirma.ThreeSharp.Query.ThreeSharpQuery.GenerateAndSendHttpWebRequest(Request request) in C:\Consulting\Amazon\Amazon S3\Affirma.ThreeSharp\Affirma.ThreeSharp\Query\ThreeSharpQuery.cs:386 Affirma.ThreeSharp.Query.ThreeSharpQuery.Invoke(Request request) in C:\Consulting\Amazon\Amazon S3\Affirma.ThreeSharp\Affirma.ThreeSharp\Query\ThreeSharpQuery.cs:479

A: 

I believe there's no COPY function in Amazon APIs today.

When you want to create a copy of an object in Amazon S3, today you must re-upload your existing object to the new name. If you do not have a copy of the object, you must first download the object and then re-uploaded to Amazon S3, incurring data transfer charges for both the download and the upload as well as a GET and PUT request charge.

(from http://doc.s3.amazonaws.com/proposals/copy.html)

So, program library you use is doing all this job for you - it's downloading your file to your machine first, and then uploads it back to Amazon.

I suggest you to upload your file straight to it's actual folder.

zed_0xff
The 2006-03-01 version of the S3 API (http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?UsingCopyingObjects.html) defines a `copy` operation, so there is definitely now a copy operation
jasonmp85