Thanks for using Bitnami. You will need to stop the apache web server and generate a new one. Note that we highly recommend you to do a server backup so you can easily get to a previous state in case you have any issues during the process. Please find below a link to our guide about how to backup and restore a server on AWS
To generate your new certificate please run the commands below. These commands will stop Apache, generate the new certificate using the lego binary present in the /opt/bitnami/letsencrypt directory and start Apache again. Please, remember to replace YOUR_EMAIL, YOUR_NON_WWW_DOMAIN and YOUR_WWW_DOMAIN placeholders with your own values.
sudo /opt/bitnami/ctlscript.sh stop apache
sudo /opt/bitnami/letsencrypt/lego --path="/opt/bitnami/letsencrypt/" --email="YOUR_EMAIL" --domains="YOUR_NON_WWW_DOMAIN" --domains="YOUR_WWW_DOMAIN" run
sudo /opt/bitnami/ctlscript.sh start apache
It is also possible that you need to edit the
renew-certificate.sh file to include the new domain. To do that, simply add a new
--domains option to the lego command in that file using your new domain name as value.
Let us know any other question you may have.