1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
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)
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace un año