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?

gefragt vor 2 Jahren1069 Aufrufe
3 Antworten
0
Akzeptierte Antwort
beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor einem Monat
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
beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor einem Monat
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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen