serverless icon indicating copy to clipboard operation
serverless copied to clipboard

Feature Request: Allow topicArn in SNS Event Source configuration

Open chalfant opened this issue 10 years ago • 3 comments

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" 
}

chalfant avatar Mar 30 '16 13:03 chalfant

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:

eahefnawy avatar Mar 30 '16 14:03 eahefnawy

It would be awesome to use the topic arn also 👍

schabert avatar Apr 05 '16 13:04 schabert

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

martinbooth avatar Apr 07 '16 01:04 martinbooth