Can I use both SNS trigger and API Gateway in same application?
connect2code opened this issue · 2 comments
Hi
I want to invoke some of the mvc apis through and some through sns invocation. Is there any way to do it in present framework ?
Hi,
At the moment it is not possible to have one handler that handles both SNS and APIGW.
Though it shouldn't be too difficult to implement this.
However, the best you can do at the moment is to have 2 separate lambda functions (i.e. RequestHandlers) and let them share the same code (i.e. project/module that contains your business logic). Would this be a possible solution for you?
Hi
Thanks for your quick reply.
Yes I thought of same workaround for quick implementation.
I will be having 2 APIs in a lambda function(Business Logic function) and have 2 other lambda functions(one invoked through API Gateway and other through SNS invocation) calling my Business Logic function.