设置EB CLI - 错误nonetype get_frozen_credentials

13
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'


我有同样的问题 :( - BilalReffas
就我所知,我在Ubuntu Trusty上遵循这个快速入门教程时也收到了相同的错误消息(并且从/usr/local/lib/python2.7/dist-packages/botocore/client.py开始的相同跟踪)。 - Skippy le Grand Gourou
之前它是工作的,还是这是你第一次尝试? - Skippy le Grand Gourou
@SkippyleGrandGourou 第一次是的,通常我会使用ssh进入实例而不使用eb cli。 - Wojtek Dmyszewicz
1
在我的情况下,我通过在正确的位置提供凭据来解决它(我错读了~/.aws/credentials.aws/credentials)。 - Skippy le Grand Gourou
7个回答

21
你遇到了这个错误是因为你没有初始化你的 AWS访问密钥IDAWS秘密访问密钥, 你需要运行pip install awscli来先安装awscli。
接下来你需要配置aws: aws configure 完成这些步骤之后,你可以运行eb init

@sadoknet 谢谢你的更新! - Wojtek Dmyszewicz

1
我也遇到了这个错误。不确定根本原因。但我仍然在使用Yosemite。当我尝试AWS的安装脚本时,它下载了EB CLI 3.7.3(Python 2.7.1) curl -s https://s3.amazonaws.com/elasticbeanstalk-cli-resources/install-ebcli.py | python 我的同事在他的电脑上使用homebrew尝试,并且(由于他已经有一段时间没有运行brew update)设法获得了版本3.5.4,这完美地工作了。
看起来Amazon可能在更新中破坏了Yosemite用户的某些东西,所以我只是下载了可用的版本,并且在运行eb init时没有任何问题。
以下是我采取的步骤:
  1. Amazon在usr/local/bin中创建了一个名为eb的符号链接指向版本3.7。删除此链接:rm /usr/local/bin/eb
  2. cd /usr/local/Library
  3. 使用Homebrew的brew log awsebcli查找版本3.5.4(21e20f5)的更新提交的sha。
  4. 运行git checkout 21e20f5 /usr/local/Library/Formula/aws-elasticbeanstalk.rb
  5. 运行brew install awsebcli,现在应该可以正常运行eb init

希望能对您有所帮助!


0

0

我曾经遇到过同样的问题。

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

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

这解决了我的问题。


0

我也遇到了同样的问题,但以某种方式解决了它。由于我是第一次做这件事,我更喜欢按照逐步文档进行操作,但导致了上述问题,但通过遵循简单的步骤解决了它

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

在我的情况下,按照文档步骤时我从未要求id/secret,但使用上述命令是可能的。
希望它对你有用!

0

~/.aws/credentials中存储凭据并调用aws configure后,我仍然需要在命令中使用--profile profile_name,否则会出现“no attribute 'get_frozen_credentials'”错误。这对我有帮助。


0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接