# Zion (v21.12) Documentation and Setting Up a Lambda Server

**URL:** <https://discuss.dgraph.io/t/zion-v21-12-documentation-and-setting-up-a-lambda-server/16396>\
**Category:** Documentation\
**Tags:** kind:question, lambda\
**Created:** [December 23, 2021, 3:11pm UTC](https://discuss.dgraph.io/t/zion-v21-12-documentation-and-setting-up-a-lambda-server/16396 "2021-12-23T15:11:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Viany\_Manuel](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/viany_manuel/32/8157_2.png) [@Viany\_Manuel](https://discuss.dgraph.io/u/Viany_Manuel)\
**Post date:** [December 23, 2021, 3:11pm UTC](https://discuss.dgraph.io/t/zion-v21-12-documentation-and-setting-up-a-lambda-server/16396/1 "2021-12-23T15:11:50Z")

</div>

As the heading suggests, is the documentation updated for Zion? Because I have been looking for an updated one to implement a lambda server, but I can’t seem to find it. Also, is it still possible to implement a different language lambda server (like [GitHub - Schartey/dgraph-lambda-go](https://github.com/Schartey/dgraph-lambda-go))? If so, how? I’ve heard/read that lambda servers are now running _with_ the alpha node, and the setup now differs from the previous ones. Thank you very much!

---

<div class="post-metadata">

**Author:** ![Schartey](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/schartey/32/8136_2.png) [@Schartey](https://discuss.dgraph.io/u/Schartey)\
**Post date:** [December 23, 2021, 9:56pm UTC](https://discuss.dgraph.io/t/zion-v21-12-documentation-and-setting-up-a-lambda-server/16396/2 "2021-12-23T21:56:20Z")

</div>

Custom Lambda Servers should still work as before, but the flags for startup have changed. It now has its own flag.

```auto
dgraph alpha ... --lambda "url=http://lambda:8686/graphql-worker"

```

You can implement your lambda server in any language that supports web serving. The only requirement is to listen on the url you specified for POST requests.  
You can have a look at the lambda implementation details by the DGraph team [here](https://github.com/dgraph-io/dgraph-lambda). There is no further documentation about the request body, you will have to check the code for that afaik.

What you have to consider:

- Custom lambda servers are not supported on DGraph Cloud.
- Latency increases in comparison to running lambdas directly on alpha as requests have to be sent to your server location. But that depends on your setup.
- You cannot currently use both alpha lambdas and custom lambdas. I’m currently working on support for this within Dgraph.

If you self host your server and want to use lambdas on alpha using JavaScript, you can use the admin api:

```auto
		"""
		Update the lambda script used by lambda resolvers.
		"""
		updateLambdaScript(input: UpdateLambdaScriptInput!) : UpdateLambdaScriptPayload

```

Unfortunately this is not yet documented. You can take a look at the schema [here](https://github.com/dgraph-io/dgraph/blob/master/graphql/admin/admin.go). Just search for “updateLambda” and you will find what you need.

---

<div class="post-metadata">

**Author:** ![Viany\_Manuel](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/viany_manuel/32/8157_2.png) [@Viany\_Manuel](https://discuss.dgraph.io/u/Viany_Manuel)\
**Post date:** [December 24, 2021, 7:00am UTC](https://discuss.dgraph.io/t/zion-v21-12-documentation-and-setting-up-a-lambda-server/16396/3 "2021-12-24T07:00:26Z")

</div>

Hi Schartey! Thank you so much for replying. I was having problems yesterday, and I see what I missed there: the quotation marks 😂 Btw, I’m a big fan of your dgraph-lambda-go project, and it’s what inspired me to write my own. Again, thank you very much!

---

<div class="post-metadata">

**Author:** ![ansonhwang](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/ansonhwang/32/9117_2.png) [@ansonhwang](https://discuss.dgraph.io/u/ansonhwang)\
**Post date:** [January 19, 2022, 3:39am UTC](https://discuss.dgraph.io/t/zion-v21-12-documentation-and-setting-up-a-lambda-server/16396/4 "2022-01-19T03:39:04Z")

</div>

Can I upload the lambda script in file via post(with binary file as request body)? Just like schema.graphql via admin/schema endpiont.

---

<div class="post-metadata">

**Author:** ![Ann\_Zhang](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/ann_zhang/32/10634_2.png) [@Ann\_Zhang](https://discuss.dgraph.io/u/Ann_Zhang)\
**Post date:** [September 12, 2022, 9:06pm UTC](https://discuss.dgraph.io/t/zion-v21-12-documentation-and-setting-up-a-lambda-server/16396/5 "2022-09-12T21:06:20Z")

</div>

> [@Schartey](#):
>
> here

Can you please share an example of mutation? Thanks

---

<div class="post-metadata">

**Author:** ![Ann\_Zhang](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/ann_zhang/32/10634_2.png) [@Ann\_Zhang](https://discuss.dgraph.io/u/Ann_Zhang)\
**Post date:** [August 25, 2023, 7:35pm UTC](https://discuss.dgraph.io/t/zion-v21-12-documentation-and-setting-up-a-lambda-server/16396/6 "2023-08-25T19:35:21Z")

</div>

updateLambdaScript no longer works for v23.0.1. Updating always returns error like:

```auto
    "errors": [
        {
            "message": "Cannot query field \"updateLambdaScript\" on type \"Mutation\".",
            "locations": [
                {
                    "line": 2,
                    "column": 2
                }
            ]
        }
    ]

```

I raised a ticket for this issue [http://discuss.hypermode.com/t/how-to-update-lambda-functions-for-dgraph-v23-0-1/18868?u=ann\_zhang](http://discuss.hypermode.com/t/how-to-update-lambda-functions-for-dgraph-v23-0-1/18868)
