I've seen this happen multiple times and it seems caused by incomplete setup of the server stack due to exhaustion of RAM memory... I don't know why this happens more on AWS than other clouds (even when I setup the exact same server stack).
Try to use a VM with at least 2GB memory and reinstall fresh.
Also I'm not 100% sure but I think port 22 is required for the AWS web-based Console to function regardless of changes you make to sshd_config... and keep in mind that the root user is disabled by default on AWS servers, even in Console mode, so using sudo is required.
On other clouds if there's any issues I can always use the Console to login as root and fix settings and reboot the server but this isn't supported on Amazon, so I use the default port 22 for SSH when using Amazon cloud servers. Also be sure you enable access to that port in both the Networking tab of the machine (AWS UI) and in any firewall too like UFW Firewall.
Besides all this, the Console has had general instability in the past as per @Carlo answer. Again, all of these challenges seem unique to Amazon...
I recommend using other clouds whenever possible lol.