Boto3 Dynamodb not able to connect from Other country but work from country its created

0

I have this code

        self.db_client = self.db_session.client("dynamodb", region_name="ap-southeast-2")
        self.db_resource = self.db_session.resource("dynamodb", region_name="ap-southeast-2")
        table = self.db_resource.Table(table_name)

I want to read item in dynamodb

If i execute this code in VPS in sydney , then it works. If i execute this code in VPS in US , then its timing out

Is there automatic restriction in AWS not to connect from outside region ?

Mirage
asked 3 years ago314 views
1 Answer
1

I do not know what VPS is, but DynamoDB is a Web Service and you can connect to it from anywhere so long as you have a path to the internet or a DynamoDB VPC Endpoint.

  1. Ensure you can connect to the DynamoDB endpoint: curl dynamodb.ap-southeast-2.amazonaws.com
  2. Ensure you have a role attached to the instance you are connecting from, be it Instance Profile or Credentials.
profile pictureAWS
EXPERT
answered 3 years ago
  • I am running my code from Google cloud instance. I have 2 servers , one in US region and other in sydney in GCP . Same code i sync across 2 servers and i use KEY / SECRET inside script. One in sydney run fine while US one timeout and when i click cancel , look like its stuck at File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "/usr/lib/python3.8/ssl.py", line 1099, in read return self._sslobj.read(len, buffer) line

  • You did not curl like I suggested. I would suggest ensuring simple networking troubleshooting is complete before continuing.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions