【发布时间】:2012-12-31 22:06:15
【问题描述】:
我想使用 CloudFront API 来发布失效请求 (http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/CreateInvalidation.html)。
请求应如下所示:
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>
从我的 iPhone 应用程序生成“AWS 身份验证字符串”的最佳方法是什么?
此链接描述了如何创建字符串,但似乎过于复杂:http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RESTAuthentication.html
如果有帮助的话,我可以访问我的 PEM 文件。
【问题讨论】:
-
哦亲爱的 - 你等了很长时间没有回复 - 我还需要为分发请求创建一个 AWS 身份验证字符串...(在我的情况下 GET 和 POST ...复制分发)。你解决了吗?
标签: ios amazon-web-services amazon-cloudfront