设置 EB CLI - 错误 nonetype get_frozen_credentials

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

当我选择一个数字或将其留空时..出现以下错误:

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

在 运行 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_valid 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(request_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'

您收到此错误是因为您没有初始化 AWS Access Key IDAWS Secret Access Key 您应该先通过 运行ing pip install awscli.

安装 awscli

需要配置aws后: aws configure

之后你可以运行eb init

嘿,我遇到了同样的问题,运行 eb 第一次在 Arch 上 Linux。

对我有用的不是简单地使用 eb init

尝试参数化初始化,例如交互式初始化

eb init -i

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

希望对您有所帮助:)

我遇到了同样的问题。

我安装了 aws-cli ( brew install awsebcli )

接下来,运行 "aws configure" 并提供正确的详细信息。

这解决了我的问题。

也遇到了同样的问题,但不知怎么解决了。因为我是第一次这样做,所以我更喜欢按照分步文档进行操作,但会导致上述问题,但可以通过以下简单步骤解决

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

就我而言,在遵循文档步骤时我从未要求 id/secret 但使用上述命令是可能的。

希望它对你有用!

运行 也变成这个错误。不确定根本原因。但我还在 Yosemite。当我尝试 AWS 的安装脚本时 curl -s https://s3.amazonaws.com/elasticbeanstalk-cli-resources/install-ebcli.py | python 它下载了 EB CLI 3.7.3 (Python 2.7.1)。一位同事在他的机器上尝试使用自制软件,并且(因为他有一段时间没有 运行 brew update)设法获得了完美运行的 3.5.4 版本。

看起来亚马逊可能在 Yosemite 用户的更新中破坏了一些东西所以我没有等待我只是下载了工作版本并且没有问题 运行ning eb init

这是我采取的步骤:

  1. Amazon 在 usr/local/bin 中创建了一个 symlink 版本 3.7,名为 eb。删除这个 link rm /usr/local/bin/eb
  2. cd /usr/local/Library
  3. 使用 homebrew 的 brew log awsebcli 找到 sha 用于版本 3.5.4 (21e20f5) 的更新提交。
  4. 运行 git checkout 21e20f5 /usr/local/Library/Formula/aws-elasticbeanstalk.rb
  5. 运行 brew install awsebclieb init 现在应该 运行 正确。

希望对您有所帮助!

凭据存储在 ~/.aws/credentials 中,甚至在调用 aws configure 之后,我仍然必须使用 --profile profile_name 和因 "no attribute 'get_frozen_credentials'" 错误而失败的命令。这为我修好了。

我遇到了同样的问题,但上面的 none 帮助了我。在创建 IAM 用户 http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html 并为其生成新密钥而不是使用 root 和 root 密钥并以传统方式执行操作后,我的问题得到了解决。