For AWS Eventbridge, how do pass the correlation-id with the message. From the AWS SDK documentation, there is not field to set the message attribute. Does this mean we have to pass the correlation-id together with the body?
this.eventBridge
.putEvents({
Entries: events.map((e) => ({
Detail: JSON.stringify({
...e,
correlationId: this.correlationId,
}),
DetailType: Type,
EventBusName: this.busName,
Source: "source",
Time: new Date(e.eventTimestamp),
})),
})
.promise()
Is this the best way for us to pass the correlation-id?