'AWS EventBridge attach cross account policies multiple times
I have a requirement such that the EventBridge in one account should accept events from multiple cross account event buses. It works fine with one policy as below:
new events.CfnEventBusPolicy(sourceBus, `CrossAccountPolicy${ACC_NAME}`, {
action: "events:PutEvents",
eventBusName: eventBusName,
principal: ACC_NUMBER,
statementId: `AcceptFrom${ACC_NUMBER}`,
});
But when i try to attach multiple targets, it does not work as below:
targets.forEach((tempObj) => {
new events.CfnEventBusPolicy(sourceBus, `CrossAccountPolicy${tempObj.ACC_NAME}`, {
action: "events:PutEvents",
eventBusName: sourceBus.eventBusName,
principal: tempObj.ACC_NUMBER,
statementId: `AcceptFrom${tempObj.ACC_NUMBER}`,
});
})
Please note that I am using aws cdk to achieve this. Could anyone please let me know how to do this.
thanks
Solution 1:[1]
You can refer to the official doc. The definition of ** and * is in the data model doc[1]. The example usage of * and ** is in the DDL doc[2] and DML doc[3]. Since the timeseries is organized as a tree, * and ** is used to match all children node of one node. The difference is that * only matches one level and ** matches multi level nodes.
[3] https://iotdb.apache.org/UserGuide/Master/IoTDB-SQL-Language/DML-Data-Manipulation-Language.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | HeimingZ |
