opened
WolVecz
username_0
I am attempting to make a simple call via boto3 to get parameters from the SSM store. However, when I make a basic call, I am consistently running into an internal boto3 error. Not sure if boto3 is broken or if I am just doing something wrong.. 

```
import boto3

region = 'us-east-1'
session = boto3.Session(region_name = region, profile_name = 'custom')
ssm = session.client('ssm')

test = ssm.get_parameters(Name = '/location/to/desired/params', WithDecryption=True)
```

This is consistently providing the following error after the last line:

```
Traceback (most recent call last):

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\httpsession.py", line 263, in send
    chunked=self._chunked(request.headers),

  File "C:\Users\me\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 677, in urlopen
    chunked=chunked,

  File "C:\Users\me\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 381, in _make_request
    self._validate_conn(conn)

  File "C:\Users\me\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 978, in _validate_conn
    conn.connect()

  File "C:\Users\me\Anaconda3\lib\site-packages\urllib3\connection.py", line 371, in connect
    ssl_context=context,

  File "C:\Users\me\Anaconda3\lib\site-packages\snowflake\connector\ssl_wrap_socket.py", line 404, in ssl_wrap_socket_with_ocsp
    ).validate(server_hostname, ret.connection)

AttributeError: 'SSLSocket' object has no attribute 'connection'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "<ipython-input-11-e49109764d13>", line 7, in <module>
    test = ssm.get_parameter(Name='/datalake/dev/snowflake/parameters/data-science-mktg',  WithDecryption=True)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\client.py", line 337, in _api_call
    return self._make_api_call(operation_name, kwargs)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\client.py", line 643, in _make_api_call
    operation_model, request_dict, request_context)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\client.py", line 662, in _make_request
    return self._endpoint.make_request(operation_model, request_dict)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\endpoint.py", line 102, in make_request
    return self._send_request(request_dict, operation_model)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\endpoint.py", line 137, in _send_request
    success_response, exception):

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\endpoint.py", line 256, in _needs_retry
    caught_exception=caught_exception, request_dict=request_dict)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\hooks.py", line 356, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\hooks.py", line 228, in emit
    return self._emit(event_name, kwargs)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\hooks.py", line 211, in _emit
    response = handler(**kwargs)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\retryhandler.py", line 183, in __call__
    if self._checker(attempts, response, caught_exception):

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\retryhandler.py", line 251, in __call__
    caught_exception)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\retryhandler.py", line 269, in _should_retry
    return self._checker(attempt_number, response, caught_exception)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\retryhandler.py", line 317, in __call__
    caught_exception)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\retryhandler.py", line 223, in __call__
    attempt_number, caught_exception)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\retryhandler.py", line 359, in _check_caught_exception
    raise caught_exception

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\endpoint.py", line 200, in _do_get_response
    http_response = self._send(request)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\endpoint.py", line 269, in _send
    return self.http_session.send(request)

  File "C:\Users\me\Anaconda3\lib\site-packages\botocore\httpsession.py", line 299, in send
    raise HTTPClientError(error=e)

HTTPClientError: An HTTP Client raised an unhandled exception: 'SSLSocket' object has no attribute 'connection'
```
I did try upgrading boto3 and I am still having the error. Note I am running this in Spyder.
AttributeError 'SSLSocket' object has not attribute 'connection'
issue
created
swetashre
username_1
@username_0 - Thank you for your post. It looks like the error is coming from snowflake connector. Are you suing snowflake connector in your code ? 
I found some issue in snowflake github repo which might help:
https://github.com/snowflakedb/snowflake-connector-python/issues/324

It looks like an issue with snowflake connector rather than boto3. I would recommend checking their [github repo](https://github.com/snowflakedb/snowflake-connector-python/issues).
comment
created
WolVecz
username_0
Oh wow. your right.... Just having "import snowflake.connector" added file seems to be the actual break. Sorry for the inconvenience. Thanks for your help!
comment
closed
swetashre
username_1
issue
created
manugarri
username_2
yeah snowflake connector is an embarrasment... still seing this issue every week :D
comment
created
WolVecz
username_0
It is truly one of the worst packages I have used to-date. Lets hope they rebuild their package with all that fresh IPO money they just got.
comment