Hi! First check if your ec2 machine can access the internet. If it can, then this is probably a firewall issue. Your firewall is blocking the port either the inbound source which is rtmp or could be the outbound port which is rtmp and rtsp.
In a Redhat/CentOS EC2 or probably other varieties of linux you can try enabling ports by using the ‘iptables’ command.
e.g.
To enable ems ports, try executing the ff. command:
-rtmp-
iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 1935 -j ACCEPT -m comment –comment "RTMP Server port"
-rtsp-
iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 554 -j ACCEPT -m comment –comment "RTSP Server port"
iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 5544 -j ACCEPT -m comment –comment "RTSP Server port"
now, perform the same set of commands but replace the -A INPUT with -A OUTPUT to enable outbound ports.
Regards,