# Error if FunctionBeat´s lambda name is changed

**URL:** <https://discuss.elastic.co/t/error-if-functionbeat-s-lambda-name-is-changed/265996>\
**Category:** Beats\
**Tags:** functionbeat\
**Created:** [March 2, 2021, 5:32pm UTC](https://discuss.elastic.co/t/error-if-functionbeat-s-lambda-name-is-changed/265996 "2021-03-02T17:32:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpm/32/84834_2.png) [@jpm](https://discuss.elastic.co/u/jpm)\
**Post date:** [March 2, 2021, 5:32pm UTC](https://discuss.elastic.co/t/error-if-functionbeat-s-lambda-name-is-changed/265996/1 "2021-03-02T17:32:19Z")

</div>

I'm trying to deploy Functionbeat lambda in AWS with a custom name. If I deploy it with the default name, _cloudwatch_, it works successfully but if I change the default name to any other name, once deployed it doesn't work, it fails with the following error:

_fork/exec /var/task/functionbeat-aws: no such file or directory: PathError null_

This is a snippet of the configuration file (the value of the name field is the one that i'm trying to change):

functionbeat.provider.aws.functions:

```auto
  # Define the list of function availables, each function required to have a unique name.
  # Create a function that accepts events coming from cloudwatchlogs.
  - name: cloudwatch
    enabled: true
    type: cloudwatch_logs

```

¿How can I change the name of the lambda function? Suggestions are well appreciated : )

Regards,

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [March 3, 2021, 10:33am UTC](https://discuss.elastic.co/t/error-if-functionbeat-s-lambda-name-is-changed/265996/2 "2021-03-03T10:33:06Z")

</div>

Is this a similar problem: [go - Getting error "fork/exec /var/task/main: no such file or directory" while executing aws-lambda function - Stack Overflow](https://stackoverflow.com/questions/58133166/getting-error-fork-exec-var-task-main-no-such-file-or-directory-while-execut) ?

---

<div class="post-metadata">

**Author:** ![jpm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpm/32/84834_2.png) [@jpm](https://discuss.elastic.co/u/jpm)\
**Post date:** [March 3, 2021, 1:39pm UTC](https://discuss.elastic.co/t/error-if-functionbeat-s-lambda-name-is-changed/265996/3 "2021-03-03T13:39:35Z")

</div>

Maybe, but I don't have the source code of the FunctionBeat so I can't check it. I tried changing the handler name as suggested in that URL but I get the same error.

The curious thing about this is that if I set the function name as "cloudwatch" it works, if i change the name of the function to "testfunction" or whatever keeping the rest of the configuration untouched, it stops working.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 31, 2021, 3:40pm UTC](https://discuss.elastic.co/t/error-if-functionbeat-s-lambda-name-is-changed/265996/4 "2021-03-31T15:40:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
