How to get my Meteor app to communicate with AWS Lambda?

I’ve got a Lambda function that transcodes WAV to MP3, which works great, but I need a way for my Meteor app to know when the process is done and successful. If anyone has worked this out, I’d love to hear about it!

1 Like

Not 100% sure if you can access it from meteor, but you could take a look at the docs: http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Lambda.html

How I’d probably approach it is to have lambda send some message to a meteor server directly or save some data to your mongodb, e.g. a collection “LambdaData” in which you store all the info from lambda about the function run. Then you can access that data from within meteor.

So instead of pulling info from lambda into meteor, I’d push info from lambda into meteor (by using ddp or mongodb).

Hope this helps

My Lambda function is triggered via S3, so I don’t think there’s any way for Meteor to connect to check the function status. But yeah, that makes sense to have Lambda talk to Meteor. I could use a package like meteorhacks:picker to set up a couple API calls that Lambda can pass info to.

Thanks!

I did it like this:

  1. I setup a route with flow router which call a meteor method, with some parameter in the route.

  2. AWS only has to curl a specific URL when it has data to pass

  3. The parameters represents the object to return, or how to retreive it

I wonder what the difference would be between using Flow Router and Picker.