# Functionbeat - deployment to multiple environments

**URL:** <https://discuss.elastic.co/t/functionbeat-deployment-to-multiple-environments/228476>\
**Category:** Beats\
**Created:** [April 17, 2020, 8:35am UTC](https://discuss.elastic.co/t/functionbeat-deployment-to-multiple-environments/228476 "2020-04-17T08:35:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vaidotas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vaidotas/32/66496_2.png) [@Vaidotas](https://discuss.elastic.co/u/Vaidotas)\
**Post date:** [April 17, 2020, 8:35am UTC](https://discuss.elastic.co/t/functionbeat-deployment-to-multiple-environments/228476/1 "2020-04-17T08:35:26Z")

</div>

I couldn't find this in documentation, so was hoping someone will be able to clarify.

What is expected flow of deployment of Functionbeat to multiple environments?

**Specific problem scenario**  
I want to deploy it to multiple environments and have field which represents environment name e.g. fields `"environment"="prod"/"dev"/...`. Each environment for Lambda has ENVIRONMENT variable set. However the problem is that when building (ziping) `functionbeat.yml` I have no idea on which environment it will be deployed, so all `{...}` environment variable usages have no desired effect - they access machine which is building, not the one on which it will be running.

I also tried to look at things like `decode_json_fields`, `copy_fields` processor configurations to extract environment info from log event itself, but it looks a bit limited and documentation lacking to come up with something useful.

Would be very thankful to any ideas.

---

<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:** [May 15, 2020, 10:35am UTC](https://discuss.elastic.co/t/functionbeat-deployment-to-multiple-environments/228476/2 "2020-05-15T10:35:39Z")

</div>

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