We've a Mariadb primary replica configuration on AWS ec2 instances. Can a 2nd replica be added by using AMI of 1st replica including root+ data ebs volumes? If AMI can be used to launch a new ec2 instance for 2nd replica what are the config's to consider like /etc/hosts, /etc/hostname, /etc/mysql/my.cnf for including this in replication from primary?
Mariadb 10.6 on Ubuntu 20.04.6