EventBridge can transform event content. Specifically, EventBridge can transform events in the standard CloudEvents format to the event type that an event target can receive before the events are routed to the event target. This topic describes the transformation methods provided by EventBridge.
Background information
EventBridge supports the following transformation methods:
Complete event
Event before transformation | Transformation method | Event after transformation |
---|---|---|
|
Complete event |
|
Partial event
If you select partial event as the transformation method, EventBridge extracts fields from an event in the CloudEvents format by using JSONPath and routes the specified part of the event to an event target. The following table describes examples of events before and after partial event transformation.
Event before transformation | Transformation method | Event after transformation |
---|---|---|
|
Partial event
Note
|
|
Constant
If you select constant as the transformation method, EventBridge routes constants in an event to an event target, regardless of what content the event contains. The following table describes examples of events before and after constant transformation.
Event before transformation | Transformation method | Event after transformation |
---|---|---|
|
Constant
Note
value: Its value can be up to 1,024 characters in length. |
|
Template
You can create a custom template and define the variables in the template. If you select template as the transformation method, EventBridge extracts fields from an event in the CloudEvents format by using JSONPath, stores the values in variables, and then routes the event in the format that is defined in the template to an event target. The following table describes examples of events before and after template transformation.
Event before transformation | Transformation method | Event after transformation |
---|---|---|
|
Template
|
|
You can customize a template in the string or JSON format, transform an event based on the template, and route the event to an event target. EventBridge supports the following types of templates:
Event before transformation | Type conversion | Event after transformation |
---|---|---|
|
Template
|
|
Event before transformation | Type conversion | Event after transformation |
---|---|---|
|
Template
|
|
Event before transformation | Type conversion | Event after transformation |
---|---|---|
|
Template
|
|
Event before transformation | Transformation method | Event after transformation |
---|---|---|
|
Template
|
|