title: how to patch boto3 lambda invoke on unit test
body: <p>I want to add a patch annotation to a unit test so that when my boto3 lambda client tries to invoke instead we will get a mock response, but when i try add the patch to my unit test it get the following error
  <code> AttributeError: &lt;function client at 0x106a38b80&gt; does not have the attribute 'invoke'</code></p>
  <p>Here is the attempted test</p>
  <pre><code>    @patch(&quot;functions.my_function.my_function.boto3.client.invoke&quot;)
      def test_duck_response_200(self, lambda_mock_response):
          mock_response = Mock()
          mock_response.status_code = 200
          mock_response.content = get_response()
          
          lambda_mock_response.return_value = mock_response
          
          id = &quot;111111111&quot;
  
          response = invoke_lambda(id)
  
  </code></pre>
  <p>Here is the function</p>
  <pre><code>lambda_client = boto3.client(&quot;lambda&quot;, region)
  
  def invoke_lambda(id):
      payload = {&quot;id&quot;: id}
  
      response = lambda_client.invoke(
          FunctionName=os.environ[&quot;MY_LAMBDA&quot;],
          Payload=json.dumps(payload),
      )
      response_content = json.loads(response[&quot;Payload&quot;].read().decode())
      return response_content[&quot;claim&quot;][0]
  </code></pre>