1 Answer
- Newest
- Most votes
- Most comments
1
Hi, Unfortunately $Connect route cannot send a response back to the client. The connection will get established successfully only when the $connect route complete its execution. Therefore, the response send by the downstream integration (like lambda function attched to $connect route) will not be send to the client. However as a workaround, You can trigger a lambda function "asynchronously" from the $connect route integration lambda function. In this new lambda functiom, you can check recursively whether the connection is established and then send a message to client using @connections api.
Client ------($Connect)------> Lambda Function--------(async Invocation)-----> Lambda function (send message using @connections api)
answered 7 months ago
Relevant content
- Accepted Answerasked 5 years ago
- asked 3 months ago
- asked 4 years ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago