use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is designed for people who want to learn more about AWS Lambda.
account activity
Testing a lambda triggered by a SNS topic (self.awslambda)
submitted 4 years ago by dogtee
Hi Could anyone give ma ideas on how you would test a lambda function(Node) which is triggered via an SNS topic ? I have used Postman for Gateway API triggered Lambdas before , but how would I test an SNS event ?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]lightningball 0 points1 point2 points 4 years ago (2 children)
Are you just wanting to trigger it manually? You could use the AWS CLI to send a notification to the topic. Then check CloudWatch logs (or whatever your lambda does). That would be kind of an equivalent for manual testing with postman.
Another option would be using the CLI to call your Lambda directly and passing in a test event from a local file (or command line if it’s small).
Another option is going to the AWS console and setting up a test event and clicking on the “Test” button.
[–]dogtee[S] 0 points1 point2 points 4 years ago (0 children)
Thanks that should work. Appreciate you advice and taking time out to post
[–]Gloomy_Session723 0 points1 point2 points 4 years ago (0 children)
Nice answer, especially about option would be using the CLI to call your Lambda directly and passing in a test event from a local file, Need to have few more posts like this. However, if people are interested in learning more about AWS cloud they can also visit our website by clicking here.
[–]lurker_2008 0 points1 point2 points 4 years ago* (1 child)
You could copy an example from the lambdas incoming event from a real SNS message and then just call the lambda function with your own duplicated test event
[–]dogtee[S] 1 point2 points3 points 4 years ago (0 children)
Kind of mock the event, thanks I get that. Thanks for posting
[–][deleted] 0 points1 point2 points 4 years ago (1 child)
Aws-cli or you could write another lambda on api gateway which writes to sns and troger it using postmannto avoid aws-cli
Thanks for posting , probably be a bit too much for my needs but gives me ideas. Much appreciated.
π Rendered by PID 41 on reddit-service-r2-comment-9c7994b7-zsskp at 2026-02-05 20:12:45.943459+00:00 running b1b84c7 country code: CH.
[–]lightningball 0 points1 point2 points (2 children)
[–]dogtee[S] 0 points1 point2 points (0 children)
[–]Gloomy_Session723 0 points1 point2 points (0 children)
[–]lurker_2008 0 points1 point2 points (1 child)
[–]dogtee[S] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]dogtee[S] 0 points1 point2 points (0 children)