How to use realm with AWS serverless lambda?

622 Views Asked by At

So I'm currently using AWS serverless to make a createObject endpoint, which takes the values from the http body and uses the key-values to store an item in DynamoDB. I am doing this via AWS Lambda. We recently started using Realm (Realm.io) and we see that they have a Javascript library for node. Is it possible to invoke a realm function to store the same object, via AWS Lambda?

2

There are 2 best solutions below

0
On

As I understand it, the Node SDK for Realm is only for the Professional and Enterprise editions of the Realm Object Server (ROS). The ROS can only be deployed on your own Linux instance.

Please see this for more details: https://realm.io/docs/realm-object-server/pe-ee/

0
On

Exactly as Clifton Labrum says, the professional and enterprise editions of the Realm Mobile Platform has a node.js SDK to be used on the server to listen for changes in Realms.

At every change in a Realm, you will get an event, which you can then process as you like. For instance, you can store objects in DynamoDB. You can also just leave the objects in Realms.