3

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.

ill_always_be_a_warriors
  • 1,546
  • 2
  • 17
  • 33
  • 1
    Oh dear - you waited a very long time and no reply - I also need to make an AWS authentication string for a distribution request... (in my case GET and POST ... copying a distribution). Did you ever solve it? – kpollock Nov 05 '13 at 10:15

1 Answers1

0

I didn't see it it in the AWS iOS SDK . Sounds like it might not be available just yet. Which is odd since other libraries, like Ruby's fog and aws-cloudfront, seem to have ways.

Community
  • 1
  • 1
yuvilio
  • 3,795
  • 32
  • 35