I had a lambda function written in Golang. And I was trying to publish a message to SNS topic from lambda function before the lambda is executed . Is it possible to do so?
4
-
You can invoke lambda by SNS.Niroshan Ranapathi– Niroshan Ranapathi2018-06-25 15:33:27 +00:00Commented Jun 25, 2018 at 15:33
-
Are you referring to using SNS to trigger lambda ? I was looking for other way around . Wanted to publish the message to SNS using lambda function . I probably might have to use AWS SDK , however I do not know if it is possible for lambda backed by Golang .rsram312– rsram3122018-06-25 15:36:13 +00:00Commented Jun 25, 2018 at 15:36
-
But you need to publish msg before the lambda is executed. right ?Niroshan Ranapathi– Niroshan Ranapathi2018-06-25 15:39:52 +00:00Commented Jun 25, 2018 at 15:39
-
Probably my wording was bit confusing . I am fine if message is published just after lambda is triggered, at very beginning of function. Message would be something like : “Lambda just got triggered”rsram312– rsram3122018-06-25 15:47:12 +00:00Commented Jun 25, 2018 at 15:47
Add a comment
|
2 Answers
Yes, you can publish a message to SNS topic using a lambda function written in Go language.
You can use the AWS SDK for GO
Comments
Although Arafat's answer is absolutely correct but if someone is really stuck here then for a detailed and step by step information on how to connect SNS with lambda function written in GoLang, can refer to : https://medium.com/@madhavchaturvedi/awesomeness-of-golang-aws-lambda-d6bd08131117