I have a cron job that runs every 10 minutes and updates the content-type and x-amz-meta. But since yesterday it seems like after the cron job run, Amazon is not picking up the changes made (refreshing his cache).
I even went and made the changes manually but no change...
When a video is uploaded it has a application/x-mp4
content-type and the cron job changes it to video/mp4
.
Although S3 has the right content type video/mp4
cloudfront shows application/x-mp4
(old content-type) ....
The cron job has been working for the last 6 months without a problem.
What is wrong with amazon caching? How can i synchronize the caching?
Don't use invalidations. They cannot be reverted and you will be charged. They only way it works for me is reducing the TTL and wait.
Regards
S3 is not used for real time development but if you really want to test your freshly deployed website use
Adding a version parameter in the end will invalidate the cached version of the file and the browser will get a fresh copy of the file from the server bucket