title: PermanentRedirect when calling the PutObject operation
body: <p>The code below work locally and uploads files from a directory to S3. It's using Boto3 with Python 3.</p>
  
  <pre><code>s3 = boto3.resource('s3', aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_ACCESS_KEY_SECRET)
  bucket = s3.Bucket(bucket_name)
  uploadFileNames = []
  for (sourceDir, dirname, filenames) in os.walk(sourceDir):
      for filename in filenames:
          bucket.put_object(Key=filename, Body=open("{}{}".format(sourceDir, filename), "rb"))
      break
  </code></pre>
  
  <p>My problem is what when I run the same code on my production server (Ubuntu) I get the following error, why? </p>
  
  <pre><code>    return self._make_api_call(operation_name, kwargs)
    File "/usr/local/lib/python3.4/site-packages/botocore/client.py", line 335, in _make_api_call
      raise ClientError(parsed_response, operation_name)
  botocore.exceptions.ClientError: An error occurred (PermanentRedirect) when calling the PutObject operation: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
  </code></pre>
  
  <p>Again locally on my Mac this code works, it is only on my Ubuntu server I get this error.</p>