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?

demandé il y a 2 ans1069 vues
3 réponses
0
Réponse acceptée
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a un mois
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
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a un mois
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
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions