Trigger AppSync subscription notification asynchronously

0

I have some processing that takes place asynchronously and I would like to notify my AppSync subscribers when the processing finishes. How can I have my asynchronous Lambda function notify Apollo-AppSync client subscribers when the processing is complete?

I am only using Cognito User Pool authentication with my API.

Why is there no AppSync topic on re:Post?

已提問 2 年前檢視次數 1069 次
3 個答案
0
已接受的答案
已回答 2 年前
profile picture
專家
已審閱 1 個月前
0

You can leverage the concept of Local Resolvers for your task.

Asynchronous Lambda can invoke mutation on a None datasource, which will cause mutation result (can be as simple as an echo of all input arguments) to be forwarded to all subscription clients.

You can review How do I notify AWS AppSync subscribers of external database updates that aren't performed by client-side mutations? for more details and step-by-step implementation guidelines.

AWS
已回答 2 年前
profile picture
專家
已審閱 1 個月前
0

What is the best practice for having my Lambda invoke a mutation? Right now my AppSync API is authorized via Cognito User Pools.

mish
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南