- Newest
- Most votes
- Most comments
It sounds your Lambda function for sendmessage doesn't complete correctly after invoking postToConnection. By default, API Gateway invokes Lambda synchronously, and will wait until your Lambda sends a response. Eventually it will be timed out(either on Lambda's task timeout or API Gateway's integration time out), then API Gateway will let the original sender know the message wasn't completed correctly. You could confirm it by checking API Gateway's execution log and Lambda's log.
If you're using Lambda non-proxy integration, you can invoke it asynchronously.
https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-integration-async.html
If you're using Lambda proxy integration, invoke a second lambda asynchronously from the first synchronous lambda then return a response immediately.
So the issue was an error with how I was handling channels for my goroutine. Just wanted to say that so the thread isn't left unanswered.
So I'm using the golang example that they aws created.
https://aws.amazon.com/blogs/compute/announcing-websocket-apis-in-amazon-api-gateway/
The intergration type is AWS_PROXY, invoking a lambda function directly. So I'm assuming I'm using proxy integration? The example doesn't have anything invoking a second method to return a response.
I'm not sure where to go from here. I think I need a bit more hand holding.
NOTE: There were no error logs in cloudwatch.
Edited by: AustinK on Aug 30, 2019 1:37 PM
Relevant content
- asked 5 years ago
- asked 4 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago