I am running a Next.js app using the custom server options and the AWS CodePipeline
for CI/CD.
My pipeline uses code build to build the app and AWS CodeDeploy
to deploy to all instances within an autoscaling group.
Configured with CodeDeployDefault.OneAtATime
I would like the cache and incrementally generated static pages to be shared between the ec2 instances.
Is there a way to do this and if so how would deployment of a new version to multiple instances work without affecting the shared files?
Stack:
- EC2 Instances running AMAZON LINUX 2
- Autoscaling group connected to an ELB