Introducing the Spotinst Functions Document Store - Spot.io

Introducing the Spotinst Functions Document Store

Functions are a great way to avoid both the complexity and costs associated with provisioning your infrastructure. One of the promises of the serverless paradigm is that functions only exist when they are called. However, this makes it difficult to maintain state and data across multiple functions or function invocations.

With the Spotinst Functions Document Store (SDS), a managed Key-Value database, you can now store new data with a single API call, instantly making it accessible to any Spotinst function in your environment. The data can then easily be accessed from any function in your environment, with low latency.

Spotinst Document Store is easy to use and can be useful for many use cases, including:

  • Sharing data across multiple functions in your environment
  • Maintaining state across multiple invocations of the same function (e.g. set a counter, assign id, etc)

Spotinst Document Store is now available in all locations and data centers. You can create documents using the Spotinst API, and access your documents from your functions using a simple getDoc command:

context.getDoc("myKey", function(err, res) {
 if(res) {
   console.log('my Value is ' + res);
   var body = {
     res: res
   }
 }

For more detailed examples, check out our Document Store how-to guide.