This message was deleted.
# aws
s
This message was deleted.
b
See screenshot - here's the subscribed lambda, as it seems all looks good. But I have noticed that in the console in the Lambda page, there's no trigger for that Lambda. And when I manually subscribed the Lambda (in the SNS console) the result was an override of this subscription (not a new one) and that also added the trigger in the Lambda. And it all worked well then.
v
I think you need to add an event source trigger for the lambda from the sns topic, I don't think a subscription is enough
b
@victorious-church-57397 thanks for the tip. I was under the impression that event sources were not for SNS. How do I add SNS as an event source?
v
Ah, it might be a lambda permission maybe? I can't see anything there to say sns can invoke it
Copy code
new aws.lambda.Permission('sns-event-trigger-permission', {
    action: 'lambda:InvokeFunction',
    principal: '<http://sns.amazonaws.com|sns.amazonaws.com>',
    function: badgerFunc.arn,
    sourceArn: topic.arn,
});
something like that ^ should solve it
b
@victorious-church-57397 you nailed it!! Man, thanks a lot! I spent on this a couple of hours! 🙂 Definitely earned your weekend!!
v
No probs mate! I was stuck on same thing a couple months ago! Glad I could help :)
🙏 1