Krizza
12/16/2021, 7:34 AMBrinsley
12/16/2021, 8:42 AMTopic
construct. Most of the SST construct static methods for importing resources. Once you’ve got the reference you should be able to add the lambda to trigger how you describe.Brinsley
12/16/2021, 8:45 AMTopic
class you want: use fromTopicArn
.Frank
const fn = new sst.Function(this, "MyFn", {
handler: "src/lambda.main";
});
And then add it as the subscriber to multiple Topics like this?
new sst.Topic(this, "MyTopicA", {
subscribers: [fn];
});
new sst.Topic(this, "MyTopicB", {
subscribers: [fn];
});
Frank
Krizza
01/03/2022, 4:27 AM