I have set up CORS configuration for my S3 bucket and everything is working as expected. Here is my JSON configuration:
[
{
"AllowedHeaders": [],
"AllowedMethods": [
"GET",
"HEAD"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": [],
"MaxAgeSeconds": 3000
}
]
But if I upload new version of file with same name, then CORS error returns again. This happens every time and only cache invalidation on CloudFront helps in this case.
How I can set up my bucket so that the CORS configuration is not reset every time when bucket objects has been updated?
Thank you for the suggestion. I'll try to disable cache for OPTIONS response on CloudFront.