I would like to be able to replicate a site built in an existing, working EC2 Linux 2 AMI image in a manner that does not require re-provisioning of https certificates when spinning up a saved AMI on a different address. The web server is stock httpd (Apache2). It has a certbot certificate for use on data1.mydomain1.com. I want TLS to work when I spin up the saved AMI on data2.mydomain.com (or data3... data4... etc., or stuff.anotherdomain.org) - without having to re-run certbot on every new instance. Is there a clean way to do this in advance? Note that because these are separate running instances, this is not a wildcard or alias situation where the names resolve to the same IP address (or are routed on the same server).
I tried
sudo certbot --expand data1.mydomain.com,data2.mydomain.com
However, data2.mydomain.com came up "not secure" (http://), although data1.mydomain.com continued to work (https://).