首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >aws部署错误ebcli.objects.exceptions.NotAuthorizedError:操作被拒绝。访问被拒绝

aws部署错误ebcli.objects.exceptions.NotAuthorizedError:操作被拒绝。访问被拒绝
EN

Stack Overflow用户
提问于 2021-08-02 15:11:20
回答 1查看 273关注 0票数 0

我一直试图使用eb create django-env将python程序部署到aws,但是它一直在产生这个错误。

代码语言:javascript
复制
NotAuthorizedError - Operation Denied. Access Denied

在深入挖掘eb create --debug的过程中,产生了这个错误

代码语言:javascript
复制
ebcli.lib.aws.InvalidParameterValueError: Platform ARN is invalid: Not an IAM ARN: 64bit Amazon Linux 2 v3.3.4 running Python 3.8.

当它到达Select a load balancer type部分时,我选择了选项2,即应用程序

但是当我为option 1 i.e. classic选择Select a load balancer type section时,它产生了

代码语言:javascript
复制
ebcli.objects.exceptions.NotAuthorizedError: Operation Denied. Access Denied

这是错误消息

代码语言:javascript
复制
    2021-08-01 09:38:36,597 (DEBUG) ebcli.core.fileoperations : File size: 78041269
    2021-08-01 09:38:36,612 (DEBUG) ebcli.lib.elasticbeanstalk : Inside get_storage_location api wrapper
    2021-08-01 09:38:36,612 (DEBUG) ebcli.lib.aws : Making api call: (elasticbeanstalk, create_storage_location) to region:us-west-2 with args:{}
    2021-08-01 09:38:38,811 (DEBUG) ebcli.lib.aws : API call finished, status = 200
    2021-08-01 09:38:38,811 (DEBUG) ebcli.lib.aws : Response: {'S3Bucket': 'elasticbeanstalk-us-west-2-395403681453', 'ResponseMetadata': {'RequestId': '2a9c9762-4a6d-46e0-9a28-c92a300b3a8c', 'HTTPStatusCode': 200, 'date': 'Sun, 01 Aug 2021 08:38:39 GMT', 'RetryAttempts': 0}}
    2021-08-01 09:38:38,811 (DEBUG) ebcli.lib.aws : Creating new Botocore Client for s3
    2021-08-01 09:38:38,906 (DEBUG) ebcli.lib.aws : Successfully created session for s3
    2021-08-01 09:38:38,906 (DEBUG) ebcli.lib.aws : Making api call: (s3, list_objects) to region: us-west-2 with args:{'Bucket': 'elasticbeanstalk-us-west-2-395403681453', 'Prefix': 'django-tutotrial/app-210801_093611.zip'}
    2021-08-01 09:38:41,130 (DEBUG) ebcli.lib.aws : API call finished, status = 200
    2021-08-01 09:38:41,130 (DEBUG) ebcli.lib.aws : Response: {'ResponseMetadata': {'RequestId': 'CJTFFNJ9QBMJAQWW', 'HostId': 'rY/gGdjoVhTa3Z2JgGgQAtGlQnf9Gg/ksaJjQmEF3zgxt9n+ddNL82b7HngUg1If4j4M4R6c2iA=', 'HTTPStatusCode': 200, 'date': 'Sun,01 Aug 2021 08:38:43 GMT', 'RetryAttempts': 0}, 'IsTruncated': False, 'Marker': '', 'Name': 'elasticbeanstalk-us-west-2-395403681453', 'Prefix': 'django-tutotrial/app-210801_093611.zip', 'MaxKeys': 1000, 'EncodingType': 'url'}
    2021-08-01 09:38:41,130 (INFO) eb : Uploading archive to s3 location: django-tutotrial/app-210801_093611.zip
    2021-08-01 09:38:41,135 (DEBUG) ebcli.core.fileoperations : Project root found at: C:\users\system1\django\firstproject
    2021-08-01 09:38:41,135 (DEBUG) ebcli.lib.s3 : Upload Application Version. File size = 78041269
    2021-08-01 09:38:41,135 (DEBUG) ebcli.lib.s3 : Doing multi-threaded upload. Parts Needed=15
    2021-08-01 09:38:41,140 (DEBUG) ebcli.lib.aws : Making api call: (s3, list_multipart_uploads) to region: us-west-2 withargs:{'Bucket': 'elasticbeanstalk-us-west-2-395403681453', 'Prefix': 'django-tutotrial/app-210801_093611.zip'}
    2021-08-01 09:38:41,635 (DEBUG) ebcli.lib.aws : Response: {'Error': {'Code': 'AccessDenied', 'Message': 'Access Denied'}, 'ResponseMetadata': {'RequestId': 'CJT8SW62G2YGRV15', 'HostId': 'zBtbEFfyKXfyCev+TIb84iVzuvFoFa9KTgUQZ/CQR99QS0urPPu+oJjnO/sJbKLHLbsiSqwuOPk=', 'HTTPStatusCode': 403, 'date': 'Sun, 01 Aug 2021 08:38:41 GMT', 'RetryAttempts': 0}}
    2021-08-01 09:38:41,640 (DEBUG) ebcli.lib.aws : API call finished, status = 403
    2021-08-01 09:38:41,640 (DEBUG) ebcli.lib.aws : Received a 403
    2021-08-01 09:38:41,885 (INFO) eb : Traceback (most recent call last):
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\operations\commonops.py", line 540, in create_app_
    version
        s3.get_object_info(bucket, key)
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\lib\s3.py", line 90, in get_object_info
        __raise_if_bucket_is_empty(result)
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\lib\s3.py", line 53, in __raise_if_bucket_is_empty
        raise NotFoundError('Object not found.')
    ebcli.objects.exceptions.NotFoundError: Object not found.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\lib\aws.py", line 212, in make_api_call
        response_data = operation(**operation_options)
      File "c:\users\system1\django\venv\lib\site-packages\botocore\client.py", line 386, in _api_call
        return self._make_api_call(operation_name, kwargs)
      File "c:\users\system1\django\venv\lib\site-packages\botocore\client.py", line 705, in _make_api_call
        raise error_class(parsed_response, operation_name)
    botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the ListMultipartUploads operation: Access Denied

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\core\ebrun.py", line 62, in run_app
        app.run()
      File "c:\users\system1\django\venv\lib\site-packages\cement\core\foundation.py", line 797, in run
        return_val = self.controller._dispatch()
      File "c:\users\system1\django\venv\lib\site-packages\cement\core\controller.py", line 472, in _dispatch
        return func()
      File "c:\users\system1\django\venv\lib\site-packages\cement\core\controller.py", line 478, in _dispatch
        return func()
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\core\abstractcontroller.py", line 92, in default
        self.do_command()
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\controllers\create.py", line 281, in do_command
        createops.make_new_env(env_request,
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\operations\createops.py", line 75, in make_new_env
        commonops.create_app_version(env_request.app_name, process=process_app_version,
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\operations\commonops.py", line 548, in create_app_version
        s3.upload_application_version(bucket, key, file_path)
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\lib\s3.py", line 149, in upload_application_version
        upload_workspace_version(bucket, key, file_path, 'Application')
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\lib\s3.py", line 144, in upload_workspace_version
        result = multithreaded_upload(bucket, key, file_path)
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\lib\s3.py", line 178, in multithreaded_upload
        upload_id = _get_multipart_upload_id(bucket, key)
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\lib\s3.py", line 311, in _get_multipart_upload_id
        response = _make_api_call('list_multipart_uploads',
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\lib\s3.py", line 40, in _make_api_call
        return aws.make_api_call('s3', operation_name, **operation_options)
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\lib\aws.py", line 221, in make_api_call_handle_response_code(e.response, attempt, aggregated_error_message)
      File "c:\users\system1\django\venv\lib\site-packages\ebcli\lib\aws.py", line 289, in _handle_response_code
        raise NotAuthorizedError('Operation Denied. ' + message)
    ebcli.objects.exceptions.NotAuthorizedError: Operation Denied. Access Denied

是什么原因造成的。当我检查aws上的用户帐户时,我可以看到活动发生在几分钟之前。杜林的eb create选项--这表明问题来自aws本身,但有些授权没有到位。我最初认为这是一个证书问题。后来,在检查帐户时,我发现用户的最后一个活动发生了变化。

  1. 请您如何更正此错误?
  2. 如何在aws中找到特定用户的错误日志?
  3. ,我的ws帐户上有什么需要做的吗?,我已经创建了凭证,该帐户显示了与用户
  4. 相关的第一次活动时间的更新,该帐户显示了与用户
  5. 相关的某些活动时间?

G 219

EN

回答 1

Stack Overflow用户

发布于 2021-08-10 07:04:47

对于我的案例,我通过将这个策略添加到用户的策略列表中来解决这个问题:"AmazonS3FullAccess“

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68623996

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档