当当前用户安装路径包含非 ASCII 字符时,AWS CLI v2.36.46 在韩国 Windows 上无法启动
作者: heewon0704创建于 2026年9月16日更新于 2026年9月16日
标签bugneeds-triage
Describe the bug AWS CLI v2.36.46 fails immediately on Korean Windows when installed for the current user and the Windows user profile path contains Korean characters. The AWS CLI was installed using the official PowerShell installer: irm https://awscli.amazonaws.com/v2/install.ps1 | iex The installation path is: C:\Users\김희원(HeewonKim)\AppData\Local\Programs\Amazon\AWSCLIV2 After installation, even a simple command such as: AWS --version fails with: AWS: [ERROR]: 'cp949' codec can't decode byte 0x80 in position 74: illegal multibyte sequence
The same error occurs with other commands, including: AWS login AWS --version --debug The issue appears to be caused by the following file: C:\Users\김희원(HeewonKim)\AppData\Local\Programs\Amazon\AWSCLIV2\awscli\data\install.json The file contains the current-user installation path: { "distribution_source": "script-exe", "install_dir": "C:\\Users\\김희원(HeewonKim)\\AppData\\Local\\Programs\\Amazon\\AWSCLIV2", "script_install": { "system": false, "version_resolved": "2.36.46", "quiet": false } } The file is valid UTF-8, but decoding it as CP949 fails at exactly the same byte position reported by the AWS CLI: Python -c "import sys; b=open(sys.argv[1],'rb').read(); print('UTF-8:', end=' '); b.decode('utf-8'); print('OK'); print('CP949:', end=' '); b.decode('cp949'); print('OK')" "C:\Users\김희원(HeewonKim)\AppData\Local\Programs\Amazon\AWSCLIV2\awscli\data\install.json" Result:UTF-8: OK UnicodeDecodeError: 'cp949' codec can't decode byte 0x80 in position 74: illegal multibyte sequenceThis matches the AWS CLI error exactly:'cp949' codec can't decode byte 0x80 in position 74Renaminginstall.jsonso that AWS CLI cannot read it immediately resolves the issue:Rename-Item $env:LOCALAPPDATA\Programs\Amazon\AWSCLIV2\awscli\data\install.json "install.json.bak" AWS --version After renaming the file, AWS --version works normally. This suggests that AWS CLI is reading install.json using the Windows locale/default encoding (cp949) instead of explicitly reading the JSON file as UTF-8.
内容来源: aws/aws-cli