Cache behaviour setting, i use
s3/*
to redirect request to s3 folder, but i don't want to place my images under a folder named s3 but right under s3 bucket to redirect like this:
xxxx.cloudfront.com/s3/images/1.png -> bucket_name/images/1.png
not
xxxx.cloudfront.com/s3/images/1.png -> bucket_name/s3/images/1.png
Please help to show me how to config like this.
I don't think this is possible. An Origin Path can redirect to a subdirectory, (eg index.htm
-> production/index.htm
) but CloudFront can't strip out path portions.
See documentation: Origin Path
Some options:
s3
s3/
at the front of your filenames (and actually use the full path)