title: Creating aws lambda integrated api gateway resource with boto3
body: <p>Im trying to, as the title dictates, create a resource with a method that triggers a lambda function with <code>boto3</code> python library.</p>
  
  <p>Im doing the following.</p>
  
  <p>First, I create the resource</p>
  
  <pre><code>new_endpoint_response = aws_apigateway.create_resource(
          restApiId = 'xxxxxxxx',
          parentId = 'xxxxxxxx',
          pathPart = event['Configure']
      )
  </code></pre>
  
  <p>Then, the post method</p>
  
  <pre><code>put_method_response = aws_apigateway.put_method(
          restApiId = 'xxxxxxxxxxx',
          resourceId = new_endpoint_response['id'],
          httpMethod = 'POST',
          authorizationType = 'NONE'
      )
  </code></pre>
  
  <p>And finally, assingn a lambda function to that method with</p>
  
  <pre><code>aws_apigateway.put_integration(
          restApiId = 'xxxxxxxxxx',
          resourceId = new_endpoint_response['id'],
          httpMethod = 'POST', 
          integrationHttpMethod = 'POST',
          type = 'AWS',
          uri = 'LAMBDA ARN'
      )
  </code></pre>
  
  <p>Here is where I'm having some issues. When I try to do the last step, I always get </p>
  
  <p><code>An error occurred (BadRequestException) when calling the PutIntegration operation: AWS ARN for integration must contain path or action</code></p>
  
  <p>And I have no idea why that is. From what I have searched, the uri required is in fact the <strong>api invocation url</strong>, problem is I have no idea what that means or how to obtain it. The example shown is the following.</p>
  
  <p><code>arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${LambdaFunctionAPI.Arn}/invocations</code></p>
  
  <p>How can I make it so that invocation URL invokes the lambda function I want and how do I even get that invocation url?</p>