Subscribe an Amazon SNS topic using AWS Lambda function?

痞子三分冷 提交于 2020-01-24 15:14:08

问题


Can we subscribe an Amazon SNS topic using an AWS Lambda function?


回答1:


Yes. With help of sns.subscribe()

Please keep in mind: dont forget to confirm it sns.confirmSubscription()




回答2:


If you mean can you use a message from a SNS topic as the trigger for a lambda function, then the answer is yes.

If you mean can you write a lambda function that adds a subscription to an SNS topic then the answer is yes. Towards the bottom are links for the language-specific AWS SDKs. Your Lambda function would need to have the appropriate permissions to be able to add a subscription as well.



来源:https://stackoverflow.com/questions/44545695/subscribe-an-amazon-sns-topic-using-aws-lambda-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!