If you use Cloudfront and a CDN you run into issues when updating your app. If you have 2 instances running and instance 1 is on version 1 and instance 2 is on version 2 (which will happen for a period while you update) then if a user is connected to instance 2, but Cloudfront connects to instance 1, the user won’t be able to use the app.
One suggested way around this was to write a script to upload these files to AWS S3 before each deploy to the servers. Has anyone had success with this technique or can advice on a different way around this issue?