-1

だから私は自分のサイトの負荷テストに機関銃を持ったミツバチを使おうとしています。

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
>>> 
4

1 に答える 1

2

エラー メッセージが示すように、boto は使用する資格情報を見つけることができません。次の場所に表示されます。

  • connect_to_region を呼び出すときに、aws_access_key_idそれらを明示的に渡すことができますaws_secret_access_key
  • 環境変数AWS_ACCESS_KEY_IDを設定して、AWS_SECRET_ACCESS_KEY
  • boto 構成ファイルを作成し (詳細はこちらを参照)、そのファイルを配置するか/etc/config、または~/.boto任意の場所に配置して、環境変数BOTO_CONFIGがそれを指すように設定できます。
  • IAM ロールを使用している場合、boto は EC2 サーバーのインスタンス メタデータで資格情報を検索します。
于 2012-12-07T11:53:18.897 に答える