Feature Request: Allow topicArn in SNS Event Source configuration
You can subscribe a function to an SNS topic, but only by specifying its name. This restricts you to only using topics in your account that you created.
I'd like to be able to subscribe to any topic ARN. Specifically, I'm writing a function that will be triggered when AWS releases new Windows images (documentation). To do so, I need to subscribe my function to topic ARN arn:aws:sns:us-east-1:801119661308:ec2-windows-ami-update.
Something like:
"name" : "NewWindowsAmi",
"type": "sns",
"config": {
"topicArn": "arn:aws:sns:us-east-1:801119661308:ec2-windows-ami-update"
}
We actually used to do it this way, but it seemed to be better UX to only provide the name.
Maybe we can accept both and detect whether it's an ARN or not. In that case it'd just be named topic.
Thanks for your suggestion, we'll keep it open for more feedback :blush:
It would be awesome to use the topic arn also 👍
I have a similar issue as above. My use-case is that my SNS topics are in a different region to the lambda due to lambda not currently being available in Sydney