这是我的简单代码:
import boto.dynamodb
conn = boto.dynamodb.connect_to_region(
'us-east-1',
aws_access_key_id='....',
aws_secret_access_key='....')
print conn
我得到:
Traceback (most recent call last):
File "startMarch28.py", line 5, in <module>
conn = boto.dynamodb.connect_to_region(
AttributeError: 'module' object has no attribute 'connect_to_region'
最佳答案
boto==2.2.2
版本的 boto.dynamodb
中没有 connect_to_region()
函数。
将模块升级到最新(2.27.0
)版本:
pip install boto --upgrade
关于python - 想要连接到 dynamoDB,得到 AttributeError : 'module' object has no attribute 'connect_to_region' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22718987/