简体   繁体   中英

Setting up the EB CLI - error nonetype get_frozen_credentials

Select a default region
1) us-east-1 : US East (N. Virginia)
2) us-west-1 : US West (N. California)
3) us-west-2 : US West (Oregon)
4) eu-west-1 : EU (Ireland)
5) eu-central-1 : EU (Frankfurt)
6) ap-southeast-1 : Asia Pacific (Singapore)
7) ap-southeast-2 : Asia Pacific (Sydney)
8) ap-northeast-1 : Asia Pacific (Tokyo)
9) ap-northeast-2 : Asia Pacific (Seoul)
10) sa-east-1 : South America (Sao Paulo)
11) cn-north-1 : China (Beijing)
(default is 3):5

When I choose a number or just leave it blank.. the following error appears:

ERROR: AttributeError :: 'NoneType' object has no attribute 'get_frozen_credentials'

after running eb init --debug:

Traceback (most recent call last): File "/usr/local/bin/eb", line 11, in sys.exit(main()) File "/Library/Python/2.7/site-packages/ebcli/core/ebcore.py", line 149, in main app.run() File "/Library/Python/2.7/site-packages/cement/core/foundation.py", line 694, in run self.controller._dispatch() File "/Library/Python/2.7/site-packages/cement/core/controller.py", line 455, in _dispatch return func() File "/Library/Python/2.7/site-packages/cement/core/controller.py", line 461, in _dispatch return func() File "/Library/Python/2.7/site-packages/ebcli/core/abstractcontroller.py", line 57, in default self.do_command() File "/Library/Python/2.7/site-packages/ebcli/controllers/initialize.py", line 67, in do_command self.set_up_credentials() File "/Library/Python/2.7/site-packages/ebcli/controllers/initialize.py", line 152, in set_up_credentials if not initializeops.credentials_are_valid(): File "/Library/Python/2.7/site-packages/ebcli/operations/initializeops.py", line 24, in credentials_are_vali d elasticbeanstalk.get_available_solution_stacks() File "/Library/Python/2.7/site-packages/ebcli/lib/elasticbeanstalk.py", line 239, in get_available_solution_stacks result = _make_api_call('list_available_solution_stacks') File "/Library/Python/2.7/site-packages/ebcli/lib/elasticbeanstalk.py", line 37, in _make_api_call **operation_options) File "/Library/Python/2.7/site-packages/ebcli/lib/aws.py", line 207, in make_api_call response_data = operation(**operation_options) File "/Library/Python/2.7/site-packages/botocore/client.py", line 310, in _api_call return self._make_api_call(operation_name, kwargs) File "/Library/Python/2.7/site-packages/botocore/client.py", line 396, in _make_api_call operation_model, request_dict) File "/Library/Python/2.7/site-packages/botocore/endpoint.py", line 111, in make_request return self._send_request(request_dict, operation_model) File "/Library/Python/2.7/site-packages/botocore/endpoint.py", line 136, in _send_request request = self.create_request(re quest_dict, operation_model) File "/Library/Python/2.7/site-packages/botocore/endpoint.py", line 120, in create_request operation_name=operation_model.name) File "/Library/Python/2.7/site-packages/botocore/hooks.py", line 226, in emit return self._emit(event_name, kwargs) File "/Library/Python/2.7/site-packages/botocore/hooks.py", line 209, in _emit response = handler(**kwargs) File "/Library/Python/2.7/site-packages/botocore/signers.py", line 90, in handler return self.sign(operation_name, request) File "/Library/Python/2.7/site-packages/botocore/signers.py", line 123, in sign signature_version) File "/Library/Python/2.7/site-packages/botocore/signers.py", line 153, in get_auth_instance kwargs['credentials'] = self._credentials.get_frozen_credentials() AttributeError: 'NoneType' object has no attribute 'get_frozen_credentials'

You got this error because you didn't initialize your AWS Access Key ID and AWS Secret Access Key you should install first awscli by runing pip install awscli .

After you need to configure aws: aws configure

After this you can run eb init

Ran into this error as well. Not sure of the root cause. But am still on Yosemite. When I tried AWS's install script curl -s https://s3.amazonaws.com/elasticbeanstalk-cli-resources/install-ebcli.py | python curl -s https://s3.amazonaws.com/elasticbeanstalk-cli-resources/install-ebcli.py | python It downloaded EB CLI 3.7.3 (Python 2.7.1). A co-worker tried on his machine using homebrew and (since he hadn't run brew update in awhile) managed to get version 3.5.4 which worked perfectly.

Looks like Amazon may have broken something in the updates for Yosemite users so rather than wait I just downloaded the working version and had no issues running eb init

Here's the steps I took:

  1. Amazon created a symlink to version 3.7 in usr/local/bin called eb . Remove this link rm /usr/local/bin/eb
  2. cd /usr/local/Library
  3. Use homebrew's brew log awsebcli to find the sha for the updated commit of version 3.5.4 (21e20f5).
  4. Run git checkout 21e20f5 /usr/local/Library/Formula/aws-elasticbeanstalk.rb
  5. Run brew install awsebcli and eb init should now run properly.

Hope that helps!

Hey I facing the same problem, running eb for the first time on Arch Linux.

What worked for me was instead of simply using eb init

try a parameterized init, for example for interactive init

eb init -i

Reference: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-init.html

Hope that helps :)

I had the same problem.

I installed aws-cli ( brew install awsebcli )

Next, run "aws configure" and provide the correct details.

This solved my problem.

Was also had same issue but solved it some how. As I was doing it for first time I prefer to follow step by step documentation but lead to above issue but solved by following simple steps

$ mkdir HelloWorld
$ cd HelloWorld
$ eb init -p PHP
$ echo "Hello World" > index.html
$ eb create dev-env
$ eb open

In my case while following document steps I never asked for id/secret but with above commands it was possible.

Hope it work for you!

With credentials stored in ~/.aws/credentials and even after calling aws configure , I still had to use --profile profile_name with the command that was failing with the "no attribute 'get_frozen_credentials'" error. This fixed it for me.

I had the same problem but none of the above helped me. My problem was solved after creating an IAM user http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html and generating new keys for it instead of using root and root keys and doing things the legacy way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM