我在python中使用aws.boto模块来调用run_instances方法来启动我的节点。我已经在爱尔兰和法兰克福地区使用此代码运行了几个月。我设置了我的连接:
conn = boto.ec2.connect_to_region("%s" % region, aws_access_key_id="%s" % aws_access,
aws_secret_access_key="%s" % aws_key)
然后我调用run_instances方法。在最简单的形式中,我这样设置:
inst_details = conn.run_instances('ami-XXXXXX',instance_type='c3.xlarge')
在法兰克福地区,这很好。但在爱尔兰地区,我得到了这个追溯。
File "/usr/lib/python2.7/site-packages/boto-2.34.0-py2.7.egg/boto/https_connection.py", line 119, in connect
sock = socket.create_connection((self.host, self.port), self.timeout)File "/usr/lib64/python2.7/socket.py", line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):socket.gaierror: [Errno -2] Name or service not known