Notify AWS AppSync subscribers

AWS Lambda → Amazon EventBridge → AWS AppSync GraphQL API → AWS AppSync GraphQL API

Notify AWS AppSync subscribers of external database updates.

In working with AppSync, one of the common patterns is publishing “out-of-band” database updates to subscribers. An “out-of-band” update occurs when some system alters data independent of an AppSync mutation.
This pattern shows how to notify AWS AppSync subscribers of external database updates that aren't performed by client-side mutations.
The demonstration of this pattern consists of 3 parts - see the repo for more details.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Launch Stack

Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/appsync-notify-subscribers-of-database-updates

Deploy

sam buildsam deploy -g --capabilities CAPABILITY_AUTO_EXPAND CAPABILITY_IAM


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Andriy Sorochan

Andriy Sorochan