# Lambda function ES module support?

**URL:** <https://answers.netlify.com/t/lambda-function-es-module-support/30673>\
**Category:** Opentalk\
**Tags:** lambda-functions\
**Created:** [January 20, 2021, 3:08pm UTC](https://answers.netlify.com/t/lambda-function-es-module-support/30673 "2021-01-20T15:08:21Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![thescientist13](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/thescientist13/32/2362_2.png) [@thescientist13](https://answers.netlify.com/u/thescientist13)\
**Post date:** [August 31, 2021, 9:46pm UTC](https://answers.netlify.com/t/lambda-function-es-module-support/30673/16 "2021-08-31T21:46:05Z")

</div>

Ok, was able to play around with this myself and found that I just needed the esbuild bundler.

Here is my _netlify.toml_

```plaintext
[build]
  publish = "dist/"
  command = "yarn build"

[build.environment]
  NODE_VERSION = "14.16.0"

[functions]
  directory = ".netlify/functions"
  node_bundler = "esbuild"

```

_hello-world.js_

```plaintext
const handler = async (event) => {
  try {
    const subject = event.queryStringParameters.name || 'World'
    return {
      statusCode: 200,
      body: JSON.stringify({ message: `Hello ${subject}` }),
    }
  } catch (error) {
    return { statusCode: 500, body: error.toString() }
  }
}

export { handler };

```

And you can see it here  
[https://nifty-franklin-58beda.netlify.app/.netlify/functions/hello-world](https://nifty-franklin-58beda.netlify.app/.netlify/functions/hello-world)

---

_[View the full topic](https://answers.netlify.com/t/lambda-function-es-module-support/30673)._
