dynamodb-copy-table icon indicating copy to clipboard operation
dynamodb-copy-table copied to clipboard

AttributeError: 'NoneType' object has no attribute 'endpoint'

Open sharabiania opened this issue 2 years ago • 1 comments

I use the docker command provided in the Readme. I keep getting the following error:

Traceback (most recent call last):
  File "dynamodb-copy-table.py", line 22, in <module>
    ddbc = DynamoDBConnection()
  File "/usr/local/lib/python3.6/site-packages/boto/dynamodb2/layer1.py", line 173, in __init__
    kwargs['host'] = region.endpoint
AttributeError: 'NoneType' object has no attribute 'endpoint'

I have initialized all the required environment variables.

sharabiania avatar Dec 12 '22 19:12 sharabiania

Hello,

Changed this ( line 19 - 23 ) if it can help someone else !

host = 'dynamodb.%s.amazonaws.com' % region
ddbc = DynamoDBConnection(is_secure=False, region=region, host=host)
# Setting the default region name for the connection.
# DynamoDBConnection.DefaultRegionName = region
# ddbc = DynamoDBConnection()

Don't forget to set AWS_DEFAULT_REGION in ENV

jerry42 avatar Feb 11 '23 16:02 jerry42