我设置了一个似乎可以工作的 DAX 集群。我可以通过 telnet 连接到它。
这是我的脚本的一部分,适用于 DynamoDB
dynamodb = boto3.resource('dynamodb', region_name='us-east-1')
但我只在那里添加 DAX 端点
dynamodb = boto3.resource('dynamodb', region_name='us-east-1',
endpoint_url='dax-test.awj2jy.clustercfg.dax.use1.cache.amazonaws.com:8111'
)
脚本失败
Traceback (most recent call last):
File "get.py", line 25, in <module>
endpoint_url='dax-test.awj2jy.clustercfg.dax.use1.cache.amazonaws.com:8111'
File "/home/ubuntu/dax/lib/python3.5/site-packages/boto3/__init__.py", line 92, in resource
return _get_default_session().resource(*args, **kwargs)
File "/home/ubuntu/dax/lib/python3.5/site-packages/boto3/session.py", line 389, in resource
aws_session_token=aws_session_token, config=config)
File "/home/ubuntu/dax/lib/python3.5/site-packages/boto3/session.py", line 263, in client
aws_session_token=aws_session_token, config=config)
File "/home/ubuntu/dax/lib/python3.5/site-packages/botocore/session.py", line 836, in create_client
client_config=config, api_version=api_version)
File "/home/ubuntu/dax/lib/python3.5/site-packages/botocore/client.py", line 71, in create_client
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/home/ubuntu/dax/lib/python3.5/site-packages/botocore/client.py", line 281, in _get_client_args
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/home/ubuntu/dax/lib/python3.5/site-packages/botocore/args.py", line 79, in get_client_args
timeout=(new_config.connect_timeout, new_config.read_timeout))
File "/home/ubuntu/dax/lib/python3.5/site-packages/botocore/endpoint.py", line 273, in create_endpoint
raise ValueError("Invalid endpoint: %s" % endpoint_url)
ValueError: Invalid endpoint: dax-test.awj2jy.clustercfg.dax.use1.cache.amazonaws.com:8111
还有什么我应该做的吗?我正在使用 boto3 v1.4.5