subchild / CloudFront-PHP-Invalidator

PHP Class for invalidating objects stored on Amazon CloudFront service.
http://www.subchild.com/2010/09/17/amazon-cloudfront-php-invalidator/
75 stars 33 forks source link

response code: 400 #2

Open gabriel-r opened 13 years ago

gabriel-r commented 13 years ago

I am trying to use the script, but CloudFront insists that my request are Bad.

CloudFront: Invalidating Object: /sites/all/themes/blueprintea/css/photovocab.css
https://cloudfront.amazonaws.com/2010-08-01/distribution//invalidation
body: <InvalidationBatch><Path>/sites/all/themes/blueprintea/css/photovocab.css</Path><CallerReference>1301671758</CallerReference></InvalidationBatch>
response: 1
response string: <?xml version="1.0"?>
<ErrorResponse xmlns="http://cloudfront.amazonaws.com/doc/2010-08-01/"><Error><Type>Sender</Type><Code>InvalidURI</Code></Error><RequestId>3f690152-5c75-11e0-b905-8fae6169b670</RequestId></ErrorResponse>

response code: 400

I am specifying the path to invalidate like this:

$key = array(
 "/sites/all/themes/blueprintea/css/photovocab.css",
 );

Am I doing something wrong?

Thank you.

guimeilin commented 13 years ago

I am trying to use the script, but CloudFront insists that my request are Bad.

CloudFront: Invalidating Object: /config/MD5Value.xml 2010-08-01/distribution//invalidation body: /config/MD5Value.xml1318299225 response: 1 response string: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

404 Not Found

Not Found

The requested URL /2010-08-01/distribution//invalidation was not found on this server.


Apache/1.3.29 Server at localhost Port 80

response code: 404

Am I doing something wrong?

Thank you.

gabriel-r commented 13 years ago

Try setting the paths without the original /