AWS ORACLE Linux 7.4 - Connection issue
Did you check firewall enabled or not on your Linux machine? If it is enabled then you should need to add your port 1521 for accepting requests just like the following command.

sudo iptables -I INPUT -p tcp --dport 1521 -j ACCEPT