VM Context Bots
To set up the Medplum Bot
framework locally, Medplum offers VM Context Bots
. VM Context allows bots to spin up a local thread inside your server, rather than using an isolated lambda.
There are two steps to set up VM context bots:
To enable VM Context Bots
on your server, set vmContextBotsEnabled: true
in both the AWS parameter store and your local config.json
file.
All Bots
have a field for runtimeVersion
, which can be set to either awslambda
or vmcontext
. To use your Bot
locally, set this field to vmcontext
.
Using VM Context allows you to use resources more efficiently, however it can also have security and isolation concerns if used in an untrusted environment. For this reason, it is important to only use VM Context Bots
in trusted environments.
WE STRONGLY CAUTION THAT VM CONTEXT BOTS SHOULD ONLY BE USED IN TRUSTED ENVIRONMENTS.
The code for these bots runs in the server, so they can potentially have access to sensitive information when run in production environments without appropriate safety measures.