title: AWS Connection error to Endpoint URL for Rekognition
body: <p>I have just started with AWS Rekognition and I have run into a problem that I can't seem to solve.</p>
  
  <p>I am using the Python script supplied on <a href="https://docs.aws.amazon.com/rekognition/latest/dg/text-detecting-text-procedure.html" rel="nofollow noreferrer">Detecting Text in an Image - Amazon Rekognition</a> to test how the service works and how I could possibly integrate it into other apps.</p>
  
  <p>I know that I have entered the correct data for the config and credential files, found here: </p>
  
  <pre><code>~/.aws/credentials
  </code></pre>
  
  <p>as other services such as S3 work without a problem using command line code. In the supplied code (I will include it at the end) I have specified the correct bucket as well as the name of the picture I'm trying to use.
  When running the script, on terminal everything works fine until after a few seconds the following error message is displayed: </p>
  
  <pre><code>botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint 
   URL: "https://rekognition.eu-west-2.amazonaws.com/"
  </code></pre>
  
  <p>I have also tried several other availability zones such as: </p>
  
  <pre><code>us-east-1, us-west-1, eu-central-1
  </code></pre>
  
  <p>yet they all result in the same error. </p>
  
  <p>A similar issue has already been discussed in <a href="https://stackoverflow.com/questions/38533897/botocore-exceptions-endpointconnectionerror-could-not-connect-to-the-endpoint">python - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint - Stack Overflow</a>. However, the solution offered in that discussion did not solve the problem I am encountering. I would appreciate any help and tips that can solve this issue. </p>
  
  <pre><code>import boto3
  
  bucket='bucket'
  photo='inputtext.jpg'
  
  client=boto3.client('rekognition')
  
  response=client.detect_text(Image={'S3Object':{'Bucket':bucket,'Name':photo}})
  
  textDetections=response['TextDetections']
  print response
  print 'Matching faces'
  for text in textDetections:
          print 'Detected text:' + text['DetectedText']
          print 'Confidence: ' + "{:.2f}".format(text['Confidence']) + "%"
          print 'Id: {}'.format(text['Id'])
          if 'ParentId' in text:
              print 'Parent Id: {}'.format(text['ParentId'])
          print 'Type:' + text['Type']
          print
  </code></pre>