EventBridge
Amazon EventBridge is a serverless event bus that makes it easy to connect applications together using data from applications, integrated Software-as-a-Service (SaaS) applications, and AWS services. EventBridge delivers a stream of real-time data from event sources, and routes that data to targets like AWS Lambda. EventBridge makes it easy to build event-driven applications because it takes care of event ingestion and delivery, security, authorization, and error handling for you.
The Amazon EventBridge Schema Registry (EBSR) stores event structure - or schema - in a shared central location and maps those schemas to code for Java, Python, and Typescript so it’s easy to use events as objects in code. It is possible to connect to and interact with the schema registry from the AWS Management Console, or REST APIs. The EBSR stores a collection of easy-to-find event schemas and enables to download code bindings for those schemas in IDEs to represent the event as a strongly-typed object in code. Schema from the event bus can also be automatically added to the registry through the schema discovery feature.
The EventBridge Schema Registry stores schemas in OpenAPI 3.0.0 format. OpenAPI is a formal specification surrounded by a large ecosystem of tools, which includes everything from front-end user interfaces, low-level code libraries and commercial API management solutions.
To perform the design of an EBSR schemas using OpenAPI 3 with Hackolade, you must first download the EventBridge plugin. This plugin is strictly compliant with version 3.0.0 of the OpenAPI specification and is based on the Hackolade plugin for OpenAPI but independent of it so it can closely match the AWS requirements for the EBSR schema.
Hackolade was specially adapted to support the design of EventBridge schemas, including all the necessary AWS metadata for the schema.
The application closely follows the terminology of the specification. The visual tool puts the focus on what really matters in an API: the schema of the information being exchanged between systems. At the same time, it provides assistance to modelers and does not require perfect mastery of the OpenAPI 3 syntax. It generates validated files that are syntactically correct and compatible with the specification thereby greatly improving productivity and quality. The software also allows retrieval (reverse-engineering) of existing schemas in the Amazon EventBridge Schema Registry, as well publishing (forward-engineering) of new schemas (or new versions of a schema).
The diagram below results from the reverse-engineering of AWS event aws.glue@GlueDataCatalogTableStateChange
Structure
The EBSR for any AWS account in a region is made of:
- an AWS event schema registry
- one or more custom schema registries
Each EBSR schema corresponds to a single Hackolade model file. While the structure of the event schema is maintained in the Components tab, the schema metadata is visible in the Schema properties tab.
Data Types
The OpenAPI specification used by EBSR describes primitives (or scalar) data types which can have an optional property modifier, format, plus a file primitive type. Complex types such as arrays and sub-objects, plus combinations thereof, are also allowed.
Event metadata
A number of properties describing the registry and each schema can be reverse-engineered and maintained in the model: