所以我正在尝试使用带有机枪的蜜蜂来加载测试我自己的网站。
01:01:11 Peters-MacBook-Pro:.ssh peterconerly$ bees up -k amazonkeypair -s 1 -g public -l ec2-user
Connecting to the hive.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/bees", line 5, in <module>
main.main()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/beeswithmachineguns/main.py", line 127, in main
parse_options()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/beeswithmachineguns/main.py", line 111, in parse_options
bees.up(options.servers, options.group, options.zone, options.instance, options.login, options.key)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/beeswithmachineguns/bees.py", line 93, in up
ec2_connection = boto.connect_ec2()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/__init__.py", line 135, in connect_ec2
return EC2Connection(aws_access_key_id, aws_secret_access_key, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/ec2/connection.py", line 87, in __init__
https_connection_factory, path)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/connection.py", line 638, in __init__
debug, https_connection_factory, path)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/connection.py", line 281, in __init__
host, config, self.provider, self._required_auth_capability())
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/auth.py", line 308, in get_auth_handler
'Check your credentials' % (len(names), str(names)))
boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['QuerySignatureV2AuthHandler'] Check your credentials
我根据http://www.synctus.com/blog/2010/04/securing-access-to-amazon-ec2-with-fingerprint-verification直接用 boto 进行了尝试 :
>>> import boto.ec2
>>> conn = boto.ec2.connect_to_region('eu-west-1')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/ec2/__init__.py", line 53, in connect_to_region
for region in regions(**kw_params):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/ec2/__init__.py", line 38, in regions
c = EC2Connection(**kw_params)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/ec2/connection.py", line 87, in __init__
https_connection_factory, path)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/connection.py", line 638, in __init__
debug, https_connection_factory, path)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/connection.py", line 281, in __init__
host, config, self.provider, self._required_auth_capability())
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/boto/auth.py", line 308, in get_auth_handler
'Check your credentials' % (len(names), str(names)))
boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['QuerySignatureV2AuthHandler'] Check your credentials
>>>