However, when I look on the lambda the trigger is missing:
When I try to hit the endpoint I get an "internal server error" message.
When I manually add the trigger in my lambda then it works but not under the 'profile' route key that I specified.
What am I missing here to correctly route my /profile in the API Gateway to my lambda?
CodePudding user response:
Based on the comments. The solution was to modify the permissions (remove source_arn
):
resource "aws_lambda_permission" "execution_lambda_from_gateway" {
statement_id = "AllowExecutionFromAPIGateway"
action = "lambda:InvokeFunction"
function_name = aws_lambda_function.executable.function_name
principal = "apigateway.amazonaws.com"
}