We have recently moved to discourse and Amazon lightsail (so I have little expertize)
I have exactly that config and I could install discourse with no problem at all.
I have installed the official Debian AMI from amazon first.
Then configured the hostname to my domain (discourse.becomeachiron.com).
Then upgrade debian to last version
sudo apt update
sudo apt upgrade
And then followed the instructions to install discourse (install git and then discourse).
No problem, it worked.
I had to open 443 port in order to get https working (and configure it in discourse).
The problem you describe seems related to DNS and IP resolve.
In lightsail there are 3 IP address for a machine.
- The static private IP that is only accesible from internal network machines in the same region as you.
- The dynamic public IP assigned dinamically when you launch the instance, which is lost each time the machine is stopped and your receive a different one when started.
- The public static IP address that you can assign to the machine. This address is permanent (but they bill you for it if the machine is stopped, it is very little but you pay for hour if the machine is not running).
Have you assigned a static public IP address to your machine?
If you have, that is the IP you have to configure in your DNS.
If not, you have to use the public IP adress, and change it each time you start the machine, as it changes (I suppose you can install a dynamic ip client in your machine that does that authomatically if you find one compatible with amazon dns).
Then you need wait a while for dns changes propagation.