I have a versioned S3 bucket as my origin. Is this the correct format for accessing a specific version of an object from CloudFront?
http://example.cloudfront.net/files/file.pdf?verisonId=[id]
It is ignoring versionId and always serving the head object.
My S3 Bucket Policy allows the following actions for CloudFront:
s3:GetObjectVersion
s3:GetObject
I've searched and searched but can't seem to find any documentation on this. How do I specify a versionId in a CloudFront URL?
I figured this out. In CloudFront go to Distributions > Behaviors. Set "Forward Query Strings" to Yes. This will allow CloudFront to pass versionId to S3 and cache the correct version.
Note that you also only need the s3:GetObject
bucket policy action to make this work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.