Moto mock lambda publishing SNS

Moto mock lambda publishing SNS



I'm trying to test locally my AWS code where lambda notifies another lambda by publishing to SNS and I subscribe an SQS service to the topic. But I'm getting error about security token - hence I think the mocked lambda does not have IAM permissions to publish to SNS. But how would I added to it? Is it not admin within local mocks?


admin



The code is as follows - https://gist.github.com/jansila/70ea0dad704f0cb7ad3d93af092fe454



So far I managed to make work only by invoking Lambda with InvocationType=RequestResponse and catching the return value directly from lambda. But could I do it as in production and receive it from SQS?


InvocationType=RequestResponse


SQS



I'd like the Lambdas to have Python3.6 runtime, otherwise, I'm using the latest moto library and its dependencies including boto3.


moto


boto3




1 Answer
1



Have a look at this issue: https://github.com/spulec/moto/issues/1793



Your issue is most probably about the version incompatibility between boto3 and moto. I installed the moto==1.3.5. That solved the problem for now.





Ok, i have a look at it soon! Thanks
– Jan Sila
Aug 31 at 15:13



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Node.js puppeteer - Use values from array in a loop to cycle through pages

How do I collapse sections of code in Visual Studio Code for Windows?