woonizzooni

AWS CLI 버전1 구성 (windows 10) 본문

AWS

AWS CLI 버전1 구성 (windows 10)

woonizzooni 2021. 5. 24. 01:06

[참고]

AWS CLI구성 (MacOS)

 

맥의 경우와 차이 없으나, MSI 설치 관리자가 아닌 python & pip로 설치할 경우 나처럼 지저분한(?) 파이썬 상태 보유자를 위한 글.

 

o 설치

   - 참고 : https://docs.aws.amazon.com/ko_kr/cli/latest/userguide/install-windows.html

   - 설치 방법 중 python & pip를 이용해서 설치

   - python 설치 참고 : [VSCode] Python가상 실행 환경 구성 (Windows환경에서)

* 이군데 저군데 너무 많이 python이 분포(?)되어 있어서 아래를 PATH 최상위로 잡아둠 *
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\python.exe

* site-packages 경로(몽땅) *
> python -m site
sys.path = [
    'C:\\Users\\{MY_NAME}',
    'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\\python37.zip',
    'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\\DLLs',
    'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\\lib',
    'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0',
    'C:\\Users\\{MY_NAME}\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python37\\site-packages',
    'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\\lib\\site-packages',
]

* 내 계정에서 설치하는 패키지 경로는 ... *
> python -m site --user-site
C:\Users\{MY_NAME}\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\
    LocalCache\local-packages\Python37\site-packages

   - 설치 및 확인

> pip3 install awscli --upgrade --user
Collecting awscli
  Downloading https://files.pythonhosted.org/packages/0f/72/172b78d81bff76a8bd135453854d8fe5f250706b4bc596e0b919ec6e29d9/awscli-1.19.78-py2.py3-none-any.whl (3.6MB)
     |████████████████████████████████| 3.6MB 1.7MB/s
Collecting PyYAML<5.5,>=3.10 (from awscli)
...

> aws --version
aws-cli/1.19.78 Python/3.7.9 Windows/10 botocore/1.20.78

> pip3 show awscli
Name: awscli
Version: 1.19.78
Summary: Universal Command Line Environment for AWS.
Home-page: http://aws.amazon.com/cli/
Author: Amazon Web Services
Author-email: None
License: Apache License 2.0
Location: c:\users\{MY_NAME}\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages
Requires: PyYAML, botocore, rsa, colorama, s3transfer, docutils
Required-by:


* 만약, aws가 없다고 나오면 아래 !!표시된 경로를 PATH에 추가 *
C:\Users\{MY_NAME}\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\
   LocalCache\local-packages\
       Python37\
           Scripts\ : pip.exe, pip3.exe, aws.cmd, ... <---- !!!
           site-packages\ : 패키지 파일 설치 위치 

 

 

o 설정

> aws configure
AWS Access Key ID [None]: ****
AWS Secret Access Key [None]:  ****
Default region name [None]: ap-northeast-2
Default output format [None]:

> aws configure list
      Name                    Value             Type    Location
      ----                    -----             ----    --------
   profile                <not set>             None    None
access_key     ****************XXXX shared-credentials-file
secret_key     ****************XXXX shared-credentials-file
    region           ap-northeast-2      config-file    ~/.aws/config
Comments