I recently started using AWS Cloudfront to serve my static files with CDN. Since then, when I deploy updated static files such as js or css, CDN doesn't serve updated static files right away. Because of this, Python files (I'm using Django) or HTML files are shown wrong as they were supposed to be working correctly with updated static files.
I found this documentation. It says that I need to add identifier to the static files. For examples, I gotta change
functions_v1.js every time deploying, so that Cloudfront doesn't serve cached static files, but serve updated static files. I manually changed the updated static files, and it worked well. However, I felt like that 's a hassle and there must be a better way so that I don't need to change all the updated file names one by one manually.
Can anyone give me a direction about this? I'm really confused about that.