
Validate and enrich events in an AWS Lambda function before AWS AppSync Events delivers them to WebSocket subscribers.
notifications channel namespace. Every event published to a notifications/... channel goes to an AWS Lambda function (REQUEST_RESPONSE) before AppSync broadcasts it to WebSocket subscribers. The function adds processedAt, enriched and messageId fields, and returns an error for a payload that isn't a JSON object.alerts, has no handler, so you can compare intercepted and plain delivery.aws appsync list-api-keys.git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/appsync-events-lambda/typescript/cdknpm installnpx cdk deploy/notifications/* in the Pub/Sub Editor of the AWS AppSync console, then publish an event to notifications/general with the HTTP endpoint and the API key. The event arrives with the fields the function added. See the README in the GitHub repo for the commands.npx cdk destroyaws logs delete-log-group --log-group-name /aws/appsync/apis/<ApiId>