Can’t connect to reverse shell – connection waits forever

I’ve setup a simple Kali Linux machine on AWS and added a security group where all ports are open, then I executed:

nc -vlp 4444 

Now, in my own personal computer I execute a simple Go program:

package main  import (     "fmt"     "net" )  const IP = "MY_PUBLIC_IP:4444"  func main() {     conn, _ := net.Dial("tcp", IP)     fmt.Println(conn) } 

Nothing really happens, the connection waits until it timeouts. Am I missing some configuration?

Thank you.