Serverless with meteor over AWS

I’m new to meteor. Picked it up last night and made a simple hello world application for iOS, android, Mac desktop and ofcourse web. I loved it.

I picked up a project to learn Serverless over AWS and i pretty much built it in raw node js. I would like to convert that node js app into meteor. I have some modules that I would like to run as microservices over it. I have some architectural questions on it.

  1. Should I keep the apis part in node js (seperate lambda) and run meteor over a lambda in React? or should i keep the meteor (server and client) folders in just one lambda and treat the entire frontend and backend of it as a microservice?

  2. I would like to use mysql (Amazon RDS) with meteor app (if decided to go as microservice), so will that affect the real time sync over all the devices?

I’m not sure that Meteor was created to work as a severless app, as it uses a persistent websocket connection.

What we did:

For CRON jobs and some other microservices we have AWS API Gateway and AWS Lambda. The main app is our Meteor app, and in AWS, we have pure nodejs servers.

You’ll lose reactivity but there is nothing stopping you from making rest calls to Lamda functions if that’s what you wanna do.

Checkout the HTTP API

You might also want to investigate Apollo for use cases where you want to augment the default Meteor set up yet still want reactivity.

1 Like

If you’d wanted serverless and Meteor-like reactivity you could choose Google’s firestore
https://firebase.google.com/docs/firestore/query-data/listen

If you want serverless + reactivity, the best option seems to be the new AWS AppSync, coupled with a db of your choice.

1 Like