I am trying to push some files up to s3 with the AWS CLI and I am running into an error:
upload failed: ... An HTTP Client raised and unhandled exception: unknown encoding: idna
I believe this is a Python specific problem but I am not sure how to enable this type of encoding for my python interpreter. I just freshly installed Python 3.6 and have verified that it being used by powershell and cmd. 
$> python --version
 Python 3.6.7
If this isn't a Python specific problem, it might be helpful to know that I also just freshly installed the AWS CLI and have it properly configured. Let me know if there is anything else I am missing to help solve this problem. Thanks.
Even I was facing same issue. I was running it on Windows server 2008 R2. I was trying to upload around 500 files to s3 using below command.

aws s3 cp sourcedir s3bucket --recursive --acl
  bucket-owner-full-control --profile profilename

It works well and uploads almost all files, but for initial 2 or 3 files, it used to fail with error: An HTTP Client raised and unhandled exception: unknown encoding: idna
This error was not consistent. The file for which upload failed, it might succeed if I try to run it again. It was quite weird.
Tried on trial and error basis and it started working well.
Solution:

Uninstalled Python 3 and AWS CLI.
Installed Python 2.7.15
Added python installed path in environment variable PATH. Also added pythoninstalledpath\scripts to PATH variable.  
AWS CLI doesnt work well with MS Installer on Windows Server 2008, instead used PIP. 

Command: 

pip install awscli

Note: for pip to work, do not forget to add pythoninstalledpath\scripts to PATH variable.
You should have following version:
Command: 

aws --version

Output: aws-cli/1.16.72 Python/2.7.15 Windows/2008ServerR2 botocore/1.12.62
Voila! The error is gone!
AWS CLI upload failed: unknown encoding: idna