title: AWS Lambda using boto3.client('iot-data') TIMEOUT as of 2021-01-26
body: <p>I have a very simple AWS Lambda function that has been firing every few seconds for 3 months <strong>without fail</strong></p>
  <pre class="lang-py prettyprint-override"><code>import boto3
  
  shadow_client = boto3.client('iot-data')
      def lambda_handler(event, context):
      response = shadow_client.list_named_shadows_for_thing(thingName='XXXXXX')
      ...
  </code></pre>
  <p>As of 2021-01-26T18:53:05.415+00:00 this has started timing out after 3000ms</p>
  <p>I'm also getting notifications of SSL errors suddenly.</p>
  <p>I see from <a href="https://pypi.org/project/boto3/#history" rel="nofollow noreferrer">the boto3 release history</a> that yesterday (2021-01-26) was when boto3 1.16.60 was released.  Maybe unrelated.  At the same time there's <a href="https://forums.aws.amazon.com/thread.jspa?messageID=971162&amp;#971162" rel="nofollow noreferrer">this</a> post of people reporting SSL errors as of 2021-01-26.  They point to AWS maybe switching from one boto3 version to another.</p>
  <p>any calls to any boto3.client('iot-data') functions time out after 3000ms:</p>
  <pre class="lang-py prettyprint-override"><code>boto3.client('iot-data').list_named_shadows_for_thing()
  boto3.client('iot-data').get_thing_shadow()
  </code></pre>
  <p>Can anyone help me:</p>
  <ol>
  <li>fix it</li>
  <li>avoid changes to boto3 stopping my code running in the future?</li>
  </ol>
  <hr />
  <p>Error Logs:</p>
  <blockquote>
  <p>[ERROR] SSLError: SSL validation failed for
  <a href="https://data.iot.eu-central-1.amazonaws.com/things/XXXX/shadow" rel="nofollow noreferrer">https://data.iot.eu-central-1.amazonaws.com/things/XXXX/shadow</a> [SSL:
  CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get
  local issuer certificate (_ssl.c:1091) Traceback (most recent call
  last):   File &quot;/var/task/lambda_function.py&quot;, line 37, in
  lambda_handler     client_shadow =
  get_shadow(clientID)['state']['desired']   File
  &quot;/var/task/lambda_function.py&quot;, line 94, in get_shadow     response =
  iot_data_client.get_thing_shadow(thingName=thing_name)   File
  &quot;/var/runtime/botocore/client.py&quot;, line 357, in _api_call     return
  self._make_api_call(operation_name, kwargs)   File
  &quot;/var/runtime/botocore/client.py&quot;, line 663, in _make_api_call<br />
  operation_model, request_dict, request_context)   File
  &quot;/var/runtime/botocore/client.py&quot;, line 682, in _make_request<br />
  return self._endpoint.make_request(operation_model, request_dict)<br />
  File &quot;/var/runtime/botocore/endpoint.py&quot;, line 102, in make_request<br />
  return self._send_request(request_dict, operation_model)   File
  &quot;/var/runtime/botocore/endpoint.py&quot;, line 137, in _send_request<br />
  success_response, exception):   File
  &quot;/var/runtime/botocore/endpoint.py&quot;, line 256, in _needs_retry<br />
  caught_exception=caught_exception, request_dict=request_dict)   File
  &quot;/var/runtime/botocore/hooks.py&quot;, line 356, in emit     return
  self._emitter.emit(aliased_event_name, **kwargs)   File
  &quot;/var/runtime/botocore/hooks.py&quot;, line 228, in emit     return
  self._emit(event_name, kwargs)   File
  &quot;/var/runtime/botocore/hooks.py&quot;, line 211, in _emit     response =
  handler(**kwargs)   File &quot;/var/runtime/botocore/retryhandler.py&quot;, line
  183, in <strong>call</strong>     if self._checker(attempts, response,
  caught_exception):   File &quot;/var/runtime/botocore/retryhandler.py&quot;,
  line 251, in <strong>call</strong>     caught_exception)   File
  &quot;/var/runtime/botocore/retryhandler.py&quot;, line 277, in _should_retry<br />
  return self._checker(attempt_number, response, caught_exception)<br />
  File &quot;/var/runtime/botocore/retryhandler.py&quot;, line 317, in <strong>call</strong><br />
  caught_exception)   File &quot;/var/runtime/botocore/retryhandler.py&quot;, line
  223, in <strong>call</strong>     attempt_number, caught_exception)   File
  &quot;/var/runtime/botocore/retryhandler.py&quot;, line 359, in
  _check_caught_exception     raise caught_exception   File &quot;/var/runtime/botocore/endpoint.py&quot;, line 200, in _do_get_response<br />
  http_response = self._send(request)   File
  &quot;/var/runtime/botocore/endpoint.py&quot;, line 269, in _send     return
  self.http_session.send(request)   File
  &quot;/var/runtime/botocore/httpsession.py&quot;, line 281, in send     raise
  SSLError(endpoint_url=request.url, error=e) @timestamp     1611687531606</p>
  </blockquote>
  <p>Actually the timeouts happen silently and are only visible from the logs by searching for timeout</p>
  <blockquote>
  <p>ingestionTime<br />
  1611687185615
  log
  535942143265:/aws/lambda/XXXXXXXXXXX
  logStream<br />
  2021/01/26/[$LATEST]xxxxxxxxxxxxxxxxxxxxx
  message
  2021-01-26T18:53:05.415Z 0b454f65-1366-4525-8288-940d6f667e6c Task timed out after 3.00 seconds
  requestId<br />
  0b454f65-1366-4525-8288-940d6f667e6c
  timestamp<br />
  1611687185415</p>
  </blockquote>