How can discourse be fully automated on AWS?

AWS have floating IPs and you can put a load balancer in front too. There are many ways to approach this, but way beyond the scope of the support we provide here in Meta.

Depends. If you want to issue an Let’s Encrypt certificate, that happens on rebuild, so the DNS must be set during it.