When you change document root, apache has to be restarted. Caching no longer in affect as that was your moodle. A simple index.html doesn't do any query of any backend DB to acquire data to ship to your brower.
With CloudFlare in-between, as it would be with DNS, that would be cached by CF and that access (index.html is what ... 1K at the most?) should be extremely fast - would imagine all of your Moodle users could access that static html page at the same time! Remember though, that access would stop at CF and be returned to all the clients accessing ... would never reach your Moodle server on Amazon.
So when you do that test of switching document root, what do you use as a URL in the browser you are using? https://IP/ or https://FQDN/
iP would attempt going directly to Amazon ... FQDN would run through CloudFlare ... never reach your Amazon server and what you get back is the cached page from CF's content delivery caching.
In order to test if it's CF issue, is to change DNS such that your FQDN doesn't return a CF route but the true Amazon IP of your web service. CF then taken out of the path to your Moodle. That kinda change would/might take a while for the DNS change to get refreshed in DNS servers.
Your moodle has a config.php file. One of the requirements of that file and clean interaction with your moodle, is the $CFG->wwwroot value ... a URL.
Moodle doesn't like relative addressing ... matterof fact the above value is used to record rows in tables of your DB to local (to your Moodle) resources ... like admin links.
In all of this, you've not really shared any info about DB server. Is that localhost in your config.php file or is it a DB server in Amazon's network?
And since a database is involved with Moodle, have you ever tweaked any DB server settings? Typical adjustments on a standalone ... meaning any/all of anything releated to moodle is on the same server (not split) ... are
Don't ask what those valuies should be with your really un-known setup.
Suggest installing MySQLTuner.PL on web server and run it from there to see what recommendations it might have for tweaking.
Just now I did a traceroute from my location to your Moodle server. Once by IP and once by FQDN.
In both they get to a hop on 52.94.35.x which goes to 52.94.33.x on the Amazon's network.
15 * * *
16 126.96.36.199 (188.8.131.52) 138.250 ms
184.108.40.206 (220.127.116.11) 142.833 ms
18.104.22.168 (22.214.171.124) 131.800 ms
17 126.96.36.199 (188.8.131.52) 129.890 ms
184.108.40.206 (220.127.116.11) 127.939 ms
18.104.22.168 (22.214.171.124) 130.474 ms
18 126.96.36.199 (188.8.131.52) 127.359 ms 127.290 ms
184.108.40.206 (220.127.116.11) 138.500 ms
19 18.104.22.168 (22.214.171.124) 130.340 ms
126.96.36.199 (188.8.131.52) 130.810 ms
184.108.40.206 (220.127.116.11) 130.543 ms
The ms times expected as am in SA USA. but speed is of the essence, yes?
If you note, at every hop there is at least 2 IP addresses involved and those ms times add up. AWS Dogfish Routing?