This could be an AWS networking issue, or a Linux internal firewall issue. You need to open the firewall for port 4351 on the server hosting the first node, wherever it is blocked. You should be able to find instructions for this within AWS documentation, and for your Ubuntu version using a Google search.