hi,
You can set inbound as above for test proposes for a short time.
What is you outbound setting ? Does it include port 5601?
which linux flavour do you use? Do the firewall rules let port 5601 out. ?
systemctl status firewalld
Are you sure 172.31.21.47 is the public allocated by AWS when the instance started, could you be using the private IP by mistake ?
When you give below command is pot 5601 listed as LISTENING. ?
tcp 0 0 0.0.0.0:5601 0.0.0.0:* LISTEN 123/node
netstat -anp
Daragh