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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则