title: Could not connect to the endpoint URL: "http://127.0.0.1:8000/"
body: <p>I have Python Falcon app running in a docker.I am trying to work local before deploying it on elastic beanstalk. When i am trying to connect local DynamoDB which is running in an another Docker, i get the following error. </p>
  
  <pre><code>hayirlisi_test | Traceback (most recent call last):
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 159, in _new_conn
  hayirlisi_test |     (self._dns_host, self.port), self.timeout, **extra_kw)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 80, in create_connection
  hayirlisi_test |     raise err
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 70, in create_connection
  hayirlisi_test |     sock.connect(sa)
  hayirlisi_test | ConnectionRefusedError: [Errno 111] Connection refused
  hayirlisi_test |
  hayirlisi_test | During handling of the above exception, another exception occurred:
  hayirlisi_test |
  hayirlisi_test | Traceback (most recent call last):
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/httpsession.py", line 258, in send
  hayirlisi_test |     decode_content=False,
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
  hayirlisi_test |     _stacktrace=sys.exc_info()[2])
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 343, in increment
  hayirlisi_test |     raise six.reraise(type(error), error, _stacktrace)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
  hayirlisi_test |     raise value
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
  hayirlisi_test |     chunked=chunked)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 354, in _make_request
  hayirlisi_test |     conn.request(method, url, **httplib_request_kw)
  hayirlisi_test |   File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
  hayirlisi_test |     self._send_request(method, url, body, headers, encode_chunked)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/awsrequest.py", line 125, in _send_request
  hayirlisi_test |     method, url, body, headers, *args, **kwargs)
  hayirlisi_test |   File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request
  hayirlisi_test |     self.endheaders(body, encode_chunked=encode_chunked)
  hayirlisi_test |   File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders
  hayirlisi_test |     self._send_output(message_body, encode_chunked=encode_chunked)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/awsrequest.py", line 152, in _send_output
  hayirlisi_test |     self.send(msg)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/awsrequest.py", line 236, in send
  hayirlisi_test |     return super(AWSConnection, self).send(str)
  hayirlisi_test |   File "/usr/local/lib/python3.6/http/client.py", line 964, in send
  hayirlisi_test |     self.connect()
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 181, in connect
  hayirlisi_test |     conn = self._new_conn()
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 168, in _new_conn
  hayirlisi_test |     self, "Failed to establish a new connection: %s" % e)
  hayirlisi_test | urllib3.exceptions.NewConnectionError: &lt;botocore.awsrequest.AWSHTTPConnection object at 0x7fb2fd187128&gt;: Failed to establish a new connection: [Errno 111] Connection r
  efused
  hayirlisi_test |
  hayirlisi_test | During handling of the above exception, another exception occurred:
  hayirlisi_test |
  hayirlisi_test | Traceback (most recent call last):
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 135, in handle
  hayirlisi_test |     self.handle_request(listener, req, client, addr)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
  hayirlisi_test |     respiter = self.wsgi(environ, resp.start_response)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/falcon/api.py", line 244, in __call__
  hayirlisi_test |     responder(req, resp, **params)
  hayirlisi_test |   File "/code/app.py", line 54, in on_get
  hayirlisi_test |     'WriteCapacityUnits': 5
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/client.py", line 357, in _api_call
  hayirlisi_test |     return self._make_api_call(operation_name, kwargs)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/client.py", line 648, in _make_api_call
  hayirlisi_test |     operation_model, request_dict, request_context)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/client.py", line 667, in _make_request
  hayirlisi_test |     return self._endpoint.make_request(operation_model, request_dict)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/endpoint.py", line 102, in make_request
  hayirlisi_test |     return self._send_request(request_dict, operation_model)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/endpoint.py", line 137, in _send_request
  hayirlisi_test |     success_response, exception):
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/endpoint.py", line 231, in _needs_retry
  hayirlisi_test |     caught_exception=caught_exception, request_dict=request_dict)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/hooks.py", line 356, in emit
  hayirlisi_test |     return self._emitter.emit(aliased_event_name, **kwargs)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/hooks.py", line 228, in emit
  hayirlisi_test |     return self._emit(event_name, kwargs)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/hooks.py", line 211, in _emit
  hayirlisi_test |     response = handler(**kwargs)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/retryhandler.py", line 183, in __call__
  hayirlisi_test |     if self._checker(attempts, response, caught_exception):
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/retryhandler.py", line 251, in __call__
  hayirlisi_test |     caught_exception)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/retryhandler.py", line 277, in _should_retry
  hayirlisi_test |     return self._checker(attempt_number, response, caught_exception)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/retryhandler.py", line 317, in __call__
  hayirlisi_test |     caught_exception)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/retryhandler.py", line 223, in __call__
  hayirlisi_test |     attempt_number, caught_exception)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
  hayirlisi_test |     raise caught_exception
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/endpoint.py", line 200, in _do_get_response
  hayirlisi_test |     http_response = self._send(request)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/endpoint.py", line 244, in _send
  hayirlisi_test |     return self.http_session.send(request)
  hayirlisi_test |   File "/usr/local/lib/python3.6/site-packages/botocore/httpsession.py", line 278, in send
  hayirlisi_test |     raise EndpointConnectionError(endpoint_url=request.url, error=e)
  hayirlisi_test | botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:8000/"
  </code></pre>
  
  <p>My DynamoDB variable declaration looks like this</p>
  
  <pre><code>dynamodb = boto3.client('dynamodb', aws_access_key_id="anything",aws_secret_access_key="anything",region_name="local",endpoint_url="http://127.0.0.1:8000/%22)
  </code></pre>
  
  <p>I tried running DynamoDB docker with "-sharedDB" parameter also. However, i cant figure out what i am doing wrong.</p>