aws部署错误ebcli.objects.exceptions.NotAuthorizedError: Operatio



我一直在尝试使用eb create django-env将我的python程序部署到aws,但它一直产生此错误

NotAuthorizedError - Operation Denied. Access Denied

在进一步深入挖掘eb create --debug时,产生了以下错误

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,即应用程序

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

ebcli.objects.exceptions.NotAuthorizedError: Operation Denied. Access Denied

这是错误信息

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:userssystem1djangofirstproject
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:userssystem1djangovenvlibsite-packagesebclioperationscommonops.py", line 540, in create_app_
version
s3.get_object_info(bucket, key)
File "c:userssystem1djangovenvlibsite-packagesebclilibs3.py", line 90, in get_object_info
__raise_if_bucket_is_empty(result)
File "c:userssystem1djangovenvlibsite-packagesebclilibs3.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:userssystem1djangovenvlibsite-packagesebclilibaws.py", line 212, in make_api_call
response_data = operation(**operation_options)
File "c:userssystem1djangovenvlibsite-packagesbotocoreclient.py", line 386, in _api_call
return self._make_api_call(operation_name, kwargs)
File "c:userssystem1djangovenvlibsite-packagesbotocoreclient.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:userssystem1djangovenvlibsite-packagesebclicoreebrun.py", line 62, in run_app
app.run()
File "c:userssystem1djangovenvlibsite-packagescementcorefoundation.py", line 797, in run
return_val = self.controller._dispatch()
File "c:userssystem1djangovenvlibsite-packagescementcorecontroller.py", line 472, in _dispatch
return func()
File "c:userssystem1djangovenvlibsite-packagescementcorecontroller.py", line 478, in _dispatch
return func()
File "c:userssystem1djangovenvlibsite-packagesebclicoreabstractcontroller.py", line 92, in default
self.do_command()
File "c:userssystem1djangovenvlibsite-packagesebclicontrollerscreate.py", line 281, in do_command
createops.make_new_env(env_request,
File "c:userssystem1djangovenvlibsite-packagesebclioperationscreateops.py", line 75, in make_new_env
commonops.create_app_version(env_request.app_name, process=process_app_version,
File "c:userssystem1djangovenvlibsite-packagesebclioperationscommonops.py", line 548, in create_app_version
s3.upload_application_version(bucket, key, file_path)
File "c:userssystem1djangovenvlibsite-packagesebclilibs3.py", line 149, in upload_application_version
upload_workspace_version(bucket, key, file_path, 'Application')
File "c:userssystem1djangovenvlibsite-packagesebclilibs3.py", line 144, in upload_workspace_version
result = multithreaded_upload(bucket, key, file_path)
File "c:userssystem1djangovenvlibsite-packagesebclilibs3.py", line 178, in multithreaded_upload
upload_id = _get_multipart_upload_id(bucket, key)
File "c:userssystem1djangovenvlibsite-packagesebclilibs3.py", line 311, in _get_multipart_upload_id
response = _make_api_call('list_multipart_uploads',
File "c:userssystem1djangovenvlibsite-packagesebclilibs3.py", line 40, in _make_api_call
return aws.make_api_call('s3', operation_name, **operation_options)
File "c:userssystem1djangovenvlibsite-packagesebclilibaws.py", line 221, in make_api_call_handle_response_code(e.response, attempt, aggregated_error_message)
File "c:userssystem1djangovenvlibsite-packagesebclilibaws.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. 我需要在我的aws账户上做一些配置吗?

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

相关内容

  • 没有找到相关文章

最新更新