Implementation of Amazon AWS CDN called CloudFront to distribute static and media files for a clustered (load balanced and auto-scaling) Magento 2 Enterprise Edition installation. Correct synchronization of the newly generated static files and newly added or updated product images etc. was a prerequisite.
The solution that Schogini implemented has these elements:
Pre-generation of all thumbnails via a custom backend script written for M2EE by Schogini team. This ensured that any catalog product updates resulted in immediate creation of pub/media/catalog/product/cache files. eg: All the cache files in these folder were auto populated.
100x100 140x140 152x188 75x75 75x90 76x76 78x78 90x90 image small_image swatch_image swatch_thumb thumbnail
AWS CLI based custom Bash script to invalidate origins
Allow Origin Setting Adjusted
CloudFront Origin pointed to an exclusive S3 Bucket