All that I've dreamed of

[AWS] awscli 명령어 AttributeError: module 'lib' has no attribute 'X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT' 오류 본문

ETC

[AWS] awscli 명령어 AttributeError: module 'lib' has no attribute 'X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT' 오류

_베토디 2024. 1. 2. 11:57
반응형

 

awscli 는 잘 사용하지 않지만 분명 몇 달전까지만 해도 문제가 없었는데요..

환경설정이 어떻게 되어있는지 확인하려고 터미널에서 aws 명령어를 실행하니

아래와 같은 오류가 절 겁주는 게 아니겠어요?  🥲

aws 로 시작하는 모든 명령어에서 같은 오류가 발생했어요

 

Traceback (most recent call last):
  File "/opt/homebrew/bin/aws", line 19, in <module>
    import awscli.clidriver
  File "/opt/homebrew/Cellar/awscli/2.13.12/libexec/lib/python3.11/site-packages/awscli/clidriver.py", line 21, in <module>
    import botocore.session
  File "/opt/homebrew/Cellar/awscli/2.13.12/libexec/lib/python3.11/site-packages/awscli/botocore/session.py", line 27, in <module>
    import botocore.client
  File "/opt/homebrew/Cellar/awscli/2.13.12/libexec/lib/python3.11/site-packages/awscli/botocore/client.py", line 16, in <module>
    from botocore import UNSIGNED, waiter, xform_name
  File "/opt/homebrew/Cellar/awscli/2.13.12/libexec/lib/python3.11/site-packages/awscli/botocore/waiter.py", line 17, in <module>
    from botocore.docs.docstring import WaiterDocstring
  File "/opt/homebrew/Cellar/awscli/2.13.12/libexec/lib/python3.11/site-packages/awscli/botocore/docs/__init__.py", line 15, in <module>
    from botocore.docs.service import ServiceDocumenter
  File "/opt/homebrew/Cellar/awscli/2.13.12/libexec/lib/python3.11/site-packages/awscli/botocore/docs/service.py", line 14, in <module>
    from botocore.docs.client import ClientDocumenter, ClientExceptionsDocumenter
  File "/opt/homebrew/Cellar/awscli/2.13.12/libexec/lib/python3.11/site-packages/awscli/botocore/docs/client.py", line 16, in <module>
    from botocore.docs.example import ResponseExampleDocumenter
  File "/opt/homebrew/Cellar/awscli/2.13.12/libexec/lib/python3.11/site-packages/awscli/botocore/docs/example.py", line 13, in <module>
    from botocore.docs.shape import ShapeDocumenter
  File "/opt/homebrew/Cellar/awscli/2.13.12/libexec/lib/python3.11/site-packages/awscli/botocore/docs/shape.py", line 19, in <module>
    from botocore.utils import is_json_value_header
  File "/opt/homebrew/Cellar/awscli/2.13.12/libexec/lib/python3.11/site-packages/awscli/botocore/utils.py", line 33, in <module>
    import botocore.httpsession
  File "/opt/homebrew/Cellar/awscli/2.13.12/libexec/lib/python3.11/site-packages/awscli/botocore/httpsession.py", line 41, in <module>
    from urllib3.contrib.pyopenssl import orig_util_SSLContext as SSLContext
  File "/opt/homebrew/Cellar/awscli/2.13.12/libexec/lib/python3.11/site-packages/urllib3/contrib/pyopenssl.py", line 50, in <module>
    import OpenSSL.crypto
  File "/opt/homebrew/lib/python3.11/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import SSL, crypto
  File "/opt/homebrew/lib/python3.11/site-packages/OpenSSL/SSL.py", line 276, in <module>
    class X509VerificationCodes:
  File "/opt/homebrew/lib/python3.11/site-packages/OpenSSL/SSL.py", line 288, in X509VerificationCodes
    ERR_UNABLE_TO_GET_ISSUER_CERT = _lib.X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'lib' has no attribute 'X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT'

 

OpenSSL을 업데이트 해보라는 등..

많은 해결방법들이 제시되어 있지만 저는 아래 링크에서 해결했어요!

 

👉🏻 참조 : https://github.com/aws/aws-cli/issues/7942

 

ERR_UNABLE_TO_GET_ISSUER_CERT error (and workaround detailed below) · Issue #7942 · aws/aws-cli

Describe the bug Hey everyone! Recently installed AWS CLI on a new laptop. Then, after installing a pip package which cascade upgraded some other pip packages, immediately ran into this error when ...

github.com

 

바로 awscli를 업데이트 하는 것!!

homebrew를 사용해 가장 최근 버전인 v2를 설치해주었어요!

 

brew install awscli@2

 

 

그리고 그 결과..!

 

 

 

편안~~ 😌

 

 

👉🏻 awscli 공식문서 : https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html#getting-started-install-instructions

 

Install or update the latest version of the AWS CLI - AWS Command Line Interface

When updating from a previous version, the unzip command prompts to overwrite existing files. To skip these prompts, such as with script automation, use the -u update flag for unzip. This flag automatically updates existing files and creates new ones as ne

docs.aws.amazon.com

 

Comments