我想使用 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 文件。