I have a WebServer say WS-1 and a NFS server say NFS-1 setup on AWS. WS-1 is being managed by an elastic load balancer and also autoscaled. It also has an EBS mounted on /var/www which contains all application code.
During autoscaling if another WS-X is launched will the /var/www mounted EBS also cloned and attached to that as well? If not, what are my options besides hosting code on root EBS volume?
Access inside NFS is defined on IP basis like 10.0.0.1/32(rw,...). During autoscaling more instances will be launched, how can i allow them to connect to NFS server and mounted the shared directory? I don't want to give access to private IP subnet using NFS, while on the Security Group level i have given access to NFS server to 0.0.0.0/0. NFS server uses fixed ports like 111, 2049, 4000-4002.