title: Integrate Lambda with rest endpoint using aws cli
body: <p>i am trying to integrate lambda and rest api gateway endpoint using aws cli and running the following command but getting follwing error </p>
  
  <pre><code>aws apigateway put-integration  --region us-west-2 --rest-api-id 91b73m5i10  --resource-id pjg2ac --http-method GET --type AWS --integration-http-method GET --uri arn:aws:apigateway:us-west-2:lambda:path/apigateway/functions/arn:aws:lambda:us-west-2:xxxxx:function:sendFile_Trips_divyanayan/invocations
  </code></pre>
  
  <p>An error occurred (NotFoundException) when calling the PutIntegration operation: Invalid Method identifier specified</p>
  
  <p>Saw this related article but was not of much help</p>
  
  <p><a href="https://stackoverflow.com/questions/39788094/create-api-gateway-lambda-integration-using-aws-cli">Create api-gateway lambda integration using aws-cli</a></p>