title: AWS - Amazon Workspaces & AWS boto3 cannot run script
body: <p>I get an error when trying to execute a boto3 (python3) script in Amazon Workspaces (Windows Server) at work. Here are the script and steps.</p>
  <p>Environment: Windows Server Datacenter</p>
  <p>Script:</p>
  <pre><code>import boto3
  
  s3 = boto3.resource('s3')
  
  my_bucket = s3.Bucket('bucket_name')
  
  for my_bucket_object in my_bucket.objects.all():
      print(my_bucket_object)
  
  </code></pre>
  <p>Steps:</p>
  <ul>
  <li>install boto3</li>
  <li>Run the python script using python your_script.py</li>
  <li>Get the following error</li>
  </ul>
  <p><strong>&quot;botocore.exceptions.HTTPClientError: An HTTP Client raised an unhandled exception: check_hostname requires server_hostname&quot;</strong></p>
  <p>I can execute AWS CLI commands in the workspace with no issues e.g. <code>aws s3</code> commands all work properly. Any pointers appreciated.</p>