I am trying to connect two computer using socket library with python. One of the system is my local system and another is an instance in AWS. The one hosted in AWS has its own public address. And my local system only has private ip address (192.168.10.1). I am able to establish connection from my local system to system in AWS. But not the vice versa.
Is it possible to connect from AWS system to local system (here local system should be listening for other incoming connection)
You need to configure your router to forward requests from AWS to the computer on your network. It would be good practice to set your local computer with a static IP address or use DHCP reservation to ensure that the address doesn't change.
warning: You will also need to ensure your connection is secure mostly likely using a combination of authentication, authorisation and encryption. Forwarding ports exposes your device to the entire world.
Connecting Server to Client using Socket Programming