Magento 2 in Multi-Node and AWS EFS: Deployment of static content
We're running Magento 2 on AWS behind an Application Load Balancer and in Auto Scaling Groups. Backend is cached by Redis. We're sharing pub/media and pub/static on AWS EFS and they are cached and delivered via AWS CloudFront. After updates, instances are deployed and an AMI is generated which serves as template for Auto Scaling.
This ensures all instances have all the data and caches are warmed up. In general, everything runs smooth and fast, because only few of all the requests reach to the nodes itself.
One big problem is when deploying new static content. Due to the nature of EFS, this is slow as hell and means a lot of downtime. Luckily, we only have 1-2 deployments per month, but this bothers me a lot.
What are better strategies (best practives?) to generate the static content and share it between instances?
Or would it be sufficient if I use the normal file system for pub/static, generate the AMI-image and spin up these instances in Auto Scaling? pub/static shouldn't change without deployment?