I have an SNS topic that already exists in our AWS environment. Instead of creating a new SNS topic, I want to simply reference the already-existing topic and publish a message to it.
Right now, I have the following:
const topic = new sns.Topic(this, 'AggregateSNS', {
contentBasedDeduplication: false,
displayName: 'Customer subscription topic',
fifo: true,
topicName: 'MySNSTopic',
//how to reference existing topics?
});
My understanding is this will create a new SNS topic, but as I said above, I want to reference an existing SNS topic.
How do I do I reference an existing SNS topic in CDK?