Amazon EventBridge schemas - Amazon EventBridge

Amazon EventBridge schemas

Schemas are available for the events of all AWS services on Amazon EventBridge. You can also create or upload schemas, or automatically infer schemas directly from events on an event bus. Once you have found or created a schema for an event, you can download code bindings for popular programming languages. You can browse, search, create, upload, and generate code bindings for schemas. You can manage schemas from the Amazon EventBridge console, using the API, or directly in your IDE using the AWS Toolkits. You can quickly build serverless apps that use events using the AWS Serverless Application Model.

EventBridge supports both OpenAPI 3 and JSONSchema Draft4 formats. Consider the additional following differences when determining the format to use.

  • JSONSchema format supports additional keywords that are not supported in OpenAPI, such as $schema, additionalItems.

  • There are minor differences in how keywords are handled, such as type and format.

  • OpenAPI does not support JSONSchema Hyper-Schema hyperlinks in JSON documents.

  • Tools for OpenAPI tend to focus on build-time, whereas tools for JSONSchema tend to focus on run-time operations, such as client tools for schema validation.

For a practical use case, consider using JSONSchema format to implement client-side validation so that you can ensure that events sent to EventBridge conform to the schema. You can use JSONSchema to define a contract for valid JSON documents, and then use a JSON schema validator before sending the associated events.