AWS AppSync API Allows Namespace Data Source Connectors
Amazon AppSync API
Amazon AppSync Events now supports channel namespace data source connections, enabling developers to construct more complicated real-time apps. This new functionality links channel namespace handlers to AWS Lambda functions, DynamoDB tables, Aurora databases, and other data sources. AWS AppSync Events allows complex, real-time programs with data validation, event transformation, and persistent event storage.
Developers may now utilise AppSync_JS batch tools to store events in DynamoDB or use Lambda functions to create complicated event processing processes. Integration enables complex interaction processes and reduces operational overhead and development time. Without integration code, events may now be automatically saved in a database.
Start with data source integrations.
Use AWS Management Console to connect data sources. I'll choose my Event API (or create one) in the console after browsing to AWS AppSync.
Direct DynamoDB event data persistence
Data sources can be integrated in several ways. The initial sample data source will be a DynamoDB table. DynamoDB needs a new table, thus create event-messages in the console. It just needs to build the table using the Partition Key id. It may choose Create table and accept default options before returning to AppSync in the console.
Return to the Event API setup in AppSync, choose Data Sources from the tabbed navigation panel, and click Create data source.
After identifying my data source, select Amazon DynamoDB from the drop-down. This shows DynamoDB configuration options.
After setting my data source, it may apply handler logic. A DynamoDB-persisted publish handler is shown here:
Use the Namespaces tabbed menu to add the handler code to a new default namespace. Clicking the default namespace's setup information brings up the Event handler creation option.
Clicking Create event handlers opens a dialogue window for Amazon. Set Code and DynamoDB data sources to publish.
Save the handler to test console tool integration. It wrote two events to DynamoDB using default parameters.
Error handling and security
The new data source connectors provide sophisticated error handling. You can return particular error messages for synchronous operations to Amazon CloudWatch to protect clients from viewing sensitive backend data. Lambda functions can offer specific validation logic for channel or message type access in authorisation circumstances.
Now available
AWS AppSync Events now provide data source integrations in all AWS regions. You may use these new features via the AWS AppSync GUI, CLI, or SDKs. Data source connectors only cost you for Lambda invocations, DynamoDB operations, and AppSync Events.
Amazon AppSync Events
Real-time events
Create compelling user experiences You may easily publish and subscribe to real-time data updates and events like live sports scores and statistics, group chat messages, price and inventory level changes, and location and schedule updates without setting up and maintaining WebSockets infrastructure.
Public/sub channels
Simplified Pub/sub
Developers can use AppSync Event APIs by naming them and defining their default authorisation mode and channel namespace(s). All done. After that, they can publish events to runtime-specified channels immediately.
Manage events
Edit and filter messages
Event handlers, which are optional, allow developers to run complex authorisation logic on publish or subscribe connection requests and change broadcast events.

















