I have a react app that uploads a file to S3. When the user press a button to extract text out of the file, the app will call a GET to API Gateway and send the file name as parameter. This will trigger the lambda function to extract the text from the file on the S3. But I am stuck with the API that needs to call the Lambda function.
I followed this tutorial from AWS: https://docs.aws.amazon.com/apigateway/latest/developerguide/integrating-api-with-aws-services-lambda.html#api-as-lambda-proxy-expose-get-method-with-query-strings-to-call-lambda-function
This is what the response is what I get when I test the API call:
Received response. Status: 403, Integration latency: 3 ms
Sun Oct 25 13:29:26 UTC 2020 : Endpoint response headers: {Date=Sun, 25 Oct 2020 13:29:26 GMT, Content-Length=130, Connection=keep-alive, x-amzn-RequestId=d8eab391-05a7-44f2-9721-ce67939a9514}
Sun Oct 25 13:29:26 UTC 2020 : Endpoint response body before transformations: <AccessDeniedException>
<Message>Unable to determine service/operation name to be authorized</Message>
</AccessDeniedException>
Sun Oct 25 13:29:26 UTC 2020 : Method response body after transformations: <AccessDeniedException>
<Message>Unable to determine service/operation name to be authorized</Message>
</AccessDeniedException>
Sun Oct 25 13:29:26 UTC 2020 : Method response headers: {X-Amzn-Trace-Id=Root=1-5f957db6-4e36be9def67f8157b8467c5, Content-Type=application/json}
Sun Oct 25 13:29:26 UTC 2020 : Successfully completed execution
Sun Oct 25 13:29:26 UTC 2020 : Method completed with status: 200
Every single post that I read about this error said that the problem is that my HTTP method must be a POST, BUT IT IS? Here in the screenshot of my settings:
Screenshot of my API integration request
So my question is, how do I fix this so that my API can call my Lambda function and return the text back to the app?
myLambdaRole?