I've been attempting create a custom Windows Server 2008 R2 AMI in AWS using Packer. Some of the necessary installation and configuration files are stored in S3. However, attempts to retrieve objects from S3 have resulted in AWS CLI errors about unknown encoding along the lines of LookupError: unknown encoding: cp65001
. The encoding errors then cause subsequent errors as the installation files weren't retrieved. The scripts and templates worked previously with Packer 0.8.6. In addition, the powershell scripts to grab content from an S3 bucket work fine when a human connects to an AWS Windows instances and runs the script manually.
I have redacted all content specific to the AWS VPC and subnets I was working in. The simple template runs a script to pull done an XML file I have been using, but I suspect any bucket and file will suffice to reproduce the error.
I'm not sure this can be reliably reproduced. I'm closing until that's sorted out.
Ran into the same issue and resolved it by adding chcp 850
to my powershell script before calling the AWS CLI.
TechNet reference: https://technet.microsoft.com/en-us/library/bb490874.aspx
@jakemig you just saved my life with that. I'm getting the error 100% of the time from a Win10 cmd.exe prompt when trying to upload a Linux GameLift build via aws gamelift upload-build
, where the code page is 437. Just like you said, manually switching to 850 fixes the error. I bet it has something to do with the upload progress display.
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Ran into the same issue and resolved it by adding
chcp 850
to my powershell script before calling the AWS CLI.TechNet reference: https://technet.microsoft.com/en-us/library/bb490874.aspx