Wednesday 17 May 2017

AWS Serverless Framework Nodejs Push Notification

I am using Serverless framework to create lambda functions with node.js backend that uses fcm-push package.

Desired flow : Call api from mobile app -> api uses fcm-push package to send the payload/message/registration tokens to Firebase Cloud Messsaging -> sends push notification to Android and iOS devices

This works perfectly when I run the api locally using "serverless invoke local..."

However, when I do "serverless deploy" and hit the api endpoint from mobile app OR a rest client like Postman, the api call times out, i changed the timeout to 45 seconds and still times out. To troubleshoot, I removed all fcm related code from the api to see if api returns a response while hitting from mobile app/Postman. It does. So it seems like AWS is preventing the api to make a call to fcm, and the call lasts until it times out.

I am not sure what I can do to get around this as I am fairly new to using AWS, so any input would be helpful



via yellowmonkey

No comments:

Post a Comment