Jason S
06/09/2022, 2:55 AMtopicBus
environment only contains the two variables set in the defaultFunctionProps
. It does not include TOPIC_BUS_ARN
Frank
this.topicBus.addSubscribers(this,
[{
// handler for creating a new brokerage
function: {
handler: "modules/brokerage/commands/create_brokerage/create_brokerage_notification_controller.main",
functionName: "CreateBrokerageNotificationHandler",
environment: {
TOPIC_BUS_ARN: this.topicBus.topicArn
},
permissions: [this.topicBus],
},
subscriberProps: {
filterPolicy: {
event: SubscriptionFilter.stringFilter({
allowlist: ["TRANSACTION_IMPORT_CREATED"],
}),
},
},
}]
)
Jason S
06/09/2022, 3:16 AMJason S
06/09/2022, 3:18 AMfunction
key. What is this doing under the hood that made it work?Frank
functionName
, environment
and permissions
should all go under the function
props.Frank