Serverless Framework Docs

#Other Bindings

The Azure Functions plugin also supports additional input and output bindings. These work by setting the direction explicitly. The properties go under the x-azure-settings property and match the same properties expected in the function.json, with the exception of "type" which is the first property's key.

You can learn about all the bindings Azure has to offer here on the official documentation.


This is an example of outputting data to Document DB.

# serverless.yml

    handler: handler.hello
      - queue: hello
          name: item #<string>, default - "myQueueItem", specifies which name is available on `context.bindings`
          connection: AzureWebJobsStorage #<string>, default - "AzureWebJobsStorage", environment variable which contains Storage Account Connection String
      - documentDB:
          name: record # Name of input parameter in function signature>",
          databaseName: myDocs # "<Name of the DocumentDB database>",
          collectionName: todo # "<Name of the DocumentDB collection>",
          createIfNotExists: true
          connection: docDBAppSetting # "<Name of app setting with connection string - see below>",
          direction: out
// handler.js

'use strict';

module.exports.hello = function(context, item) {
  context.log('Received item: ${item}');
  context.bindings.record = {
    hello: 'world',

Have questions?

Head over to the forums to search for your questions and issues or post a new one.