newsapps/beeswithmachineguns

boto.exception.NoAuthHandlerFound

Opened this issue · 0 comments

Ubuntu 22.04, Python 3.10

According to the README you can create a file ~/.boto with credentials.

I have done that, using exactly that format.

However it consistently results in this error:

boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV4Handler'] Check your credentials

The full text is below.

What does work successfully is

export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=

So it's possible to continue using environment variables.

./bees up -k mykey
Read 5 bees from the roster: us-west-2a
Traceback (most recent call last):
  File "/opt/github/beeswithmachineguns/./bees", line 6, in <module>
    main.main()
  File "/opt/github/beeswithmachineguns/beeswithmachineguns/main.py", line 277, in main
    parse_options()
  File "/opt/github/beeswithmachineguns/beeswithmachineguns/main.py", line 216, in parse_options
    bees.up(options.servers, options.group, options.zone, options.instance, options.type, options.login, options.key, options.subnet, options.tags, options.bid)
  File "/opt/github/beeswithmachineguns/beeswithmachineguns/bees.py", line 141, in up
    ec2_connection = boto.ec2.connect_to_region(_get_region(zone))
  File "/usr/local/lib/python3.10/dist-packages/boto/ec2/__init__.py", line 66, in connect_to_region
    return region.connect(**kw_params)
  File "/usr/local/lib/python3.10/dist-packages/boto/regioninfo.py", line 187, in connect
    return self.connection_cls(region=self, **kw_params)
  File "/usr/local/lib/python3.10/dist-packages/boto/ec2/connection.py", line 95, in __init__
    super(EC2Connection, self).__init__(aws_access_key_id,
  File "/usr/local/lib/python3.10/dist-packages/boto/connection.py", line 1091, in __init__
    super(AWSQueryConnection, self).__init__(
  File "/usr/local/lib/python3.10/dist-packages/boto/connection.py", line 568, in __init__
    self._auth_handler = auth.get_auth_handler(
  File "/usr/local/lib/python3.10/dist-packages/boto/auth.py", line 984, in get_auth_handler
    raise boto.exception.NoAuthHandlerFound(
boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV4Handler'] Check your credentials

Just found a solution. Upgrade boto to 2.49.0. However requirements.txt is set to boto==2.38.0