I want to use the CloudFront API to POST an invalidation request (http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/CreateInvalidation.html).
The request should look like this:
POST /2012-07-01/distribution/distribution ID/invalidation HTTP/1.0
Host: cloudfront.amazonaws.com
Authorization: AWS authentication string
Content-Type: text/xml
Other required headers
<?xml version="1.0" encoding="UTF-8"?>
<InvalidationBatch xmlns="http://cloudfront.amazonaws.com/doc/2012-07-01/">
<Paths>
<Quantity>number of objects to invalidate</Quantity>
<Items>
<Path>/path to object to invalidate</Path>
</Items>
</Paths>
<CallerReference>unique identifier for this invalidation batch</CallerReference>
</InvalidationBatch>
What's the best way to generate the "AWS authentication string" from my iPhone app?
This link describes how to create the string, but it seems overly complicated: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RESTAuthentication.html
I have access to my PEM file if that helps at all.