Are Cloudfront Distributions actually implemented?

May 30, 2009 at 11:07 AM

Are Cloudfront Distributions actually implemented and tested in the library, or is the code for them simply placeholder?  I ask this because not only does it not work, but I can't see any code path that could possibly cause it to work in its current implementation.

You have a DistributionConfig object with a toXML method, yet that method is never called anywhere.  Further, the DistributionConfig and DistributionInfo objects are never referenced anywhere except to set them.  For the library to function, it would need to pull information out of these objects and pass them along to webservice requests, yet it never does so.

The only other thread here on Cloudfront is seeing the same issue that I do.  AWS is simply giving Error 500 responses to Cloudfront operations, presumably because it is receiving no data in the request.

If I am wrong here, please correct me.  Otherwise, could you please either implement or remove the Cloudfront code in your library?  As it stands, it is simply misleading.

 

 

 

Jun 1, 2009 at 4:12 PM
Edited Jun 1, 2009 at 4:16 PM

Answering my own question:  no.

But it's close.  Here's what you'll need to do to get DistributionUpdateRequest to work:

 

DistributionUpdateRequest.cs, inside the constructor you'll need this line:

LoadStreamWithString(distInfo.DistributionConfig.ToXml().InnerXml);

 

ThreeSharpQuery.cs, comment out this line inside of private T Invoke<T>(Request request) where T : Response, new():

if (response.Method == "GET")

 

That should get you back in business (though Team ThreeSharp, you might want to tidy things up a bit).  Basically, the contents of the PUT request were never getting sent, so DistributionUpdateRequests were always failing with an unhelpful Server 500 error.  Worse, the transfer statistics weren't getting initialized for PUT requests, since nothing ever really was being PUT.