# Functionbeats and Role Name Error

**URL:** <https://discuss.elastic.co/t/functionbeats-and-role-name-error/272454>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 7, 2021, 10:39pm UTC](https://discuss.elastic.co/t/functionbeats-and-role-name-error/272454 "2021-05-07T22:39:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gonrial](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gonrial/32/88422_2.png) [@gonrial](https://discuss.elastic.co/u/gonrial)\
**Post date:** [May 7, 2021, 10:39pm UTC](https://discuss.elastic.co/t/functionbeats-and-role-name-error/272454/1 "2021-05-07T22:39:33Z")

</div>

I have an error when building a functionbeat lambda to ship other lambdas logs to elastic cloud.  
The reason is that the name is too long. According to the documentation should be ~20 chars long, but in this case is 16 chars long and it fails.

```auto
...
functionbeat.provider.aws.functions:
  - name: logmyproject-devstag
...

```

I tracked down to this line of code

> <https://github.com/elastic/beats/blob/master/x-pack/functionbeat/manager/aws/template_builder.go#L267>

I exported the function using 7.12.1 I see that the role name

```auto
"RoleName": "functionbeat-lambda-logmyproject-devstag-eyAiUmVmIjogIkFXUzo6UmVnaW9uIiB9"

```

The issue I detected is that `eyAiUmVmIjogIkFXUzo6UmVnaW9uIiB9` is the base64 of  
`{ "Ref": "AWS::Region" }`

How can I fix this?

---

<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:** [June 5, 2021, 12:39am UTC](https://discuss.elastic.co/t/functionbeats-and-role-name-error/272454/2 "2021-06-05T00:39:57Z")

</div>

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