将Django站点部署到elasticbeanstalk:NotAuthorizedError:操作被拒绝。请求中包含的安全令牌无效

时间:2018-12-09 18:40:22

标签: django github deployment ebcli amazon-elastic-beanstalk

尝试使用CLI部署到弹性beantalk时出现此错误。

在我将代码添加到远程git存储库之前,部署工作正常

(theplay.team) vagrant@debian-7:/vagrant/Devel/theplay.team/theplayteam$ eb deploy --verbose
INFO: Deploying code to playground-env in region us-east-1
INFO: Getting version label from git with git-describe
/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/urllib3/util/ssl_.py:339: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning
INFO: Traceback (most recent call last):
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/ebcli/core/ebrun.py", line 41, in run_app
    app.run()
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/cement/core/foundation.py", line 797, in run
    return_val = self.controller._dispatch()
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/cement/core/controller.py", line 472, in _dispatch
    return func()
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/cement/core/controller.py", line 478, in _dispatch
    return func()
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/ebcli/core/abstractcontroller.py", line 85, in default
    self.do_command()
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/ebcli/controllers/deploy.py", line 83, in do_command
    staged=self.staged, timeout=self.timeout, source=self.source)
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/ebcli/operations/deployops.py", line 50, in deploy
    app_name, process=process_app_versions, label=label, message=message, staged=staged, build_config=build_config)
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/ebcli/operations/commonops.py", line 507, in create_app_version
    s3_bucket, s3_key = get_app_version_s3_location(app_name, version_label)
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/ebcli/operations/commonops.py", line 347, in get_app_version_s3_location
    app_version = elasticbeanstalk.application_version_exists(app_name, version_label)
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/ebcli/lib/elasticbeanstalk.py", line 408, in application_version_exists
    app_versions = get_application_versions(app_name, version_labels=[version_label])['ApplicationVersions']
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/ebcli/lib/elasticbeanstalk.py", line 403, in get_application_versions
    **kwargs)
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/ebcli/lib/elasticbeanstalk.py", line 40, in _make_api_call
    **operation_options)
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/ebcli/lib/aws.py", line 221, in make_api_call
    _handle_response_code(e.response, attempt, aggregated_error_message)
  File "/vagrant/.virtualenvs/theplay.team/local/lib/python2.7/site-packages/ebcli/lib/aws.py", line 285, in _handle_response_code
    raise NotAuthorizedError('Operation Denied. ' + message)
NotAuthorizedError: Operation Denied. The security token included in the request is invalid.

0 个答案:

没有答案