I have been using the Bitnami multi-tier WordPress stack on AWS.
I know how to use autoscaling on AWS, but none of the documentation has showed me where to store changeable data files when using something like WordPress.
The database is on RDS, so that is not an issue, and uploaded static files can be kept on S3 or EFS. Latency will not be a problem, as the static files will be on the CloudFront CDN.
What I am unsure about is what to do about the wp-content/plugins
directory, as the data there will be changed by the WordPress administrators, so it can't just be part of the AMI.
This page says under "Don't even think about running app code from EFS" that these files should not be on EFS, due to latency.
So should these files be copied from EFS to new instances using a EC2 bootstrap script or something like that? I could use rsync or aws-cli I suppose?
Or should I be doing this though a lifecycle hook or Lambda?
This can't be a unusual scenario, so I am surprised how difficult it has been to find any information about this.