# Functionbeat ignores default region - only deploys to us-east-1 (AWS)

**URL:** <https://discuss.elastic.co/t/functionbeat-ignores-default-region-only-deploys-to-us-east-1-aws/276002>\
**Category:** Beats\
**Tags:** functionbeat\
**Created:** [June 15, 2021, 1:05pm UTC](https://discuss.elastic.co/t/functionbeat-ignores-default-region-only-deploys-to-us-east-1-aws/276002 "2021-06-15T13:05:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phuurl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phuurl/32/90339_2.png) [@Phuurl](https://discuss.elastic.co/u/Phuurl)\
**Post date:** [June 15, 2021, 1:05pm UTC](https://discuss.elastic.co/t/functionbeat-ignores-default-region-only-deploys-to-us-east-1-aws/276002/1 "2021-06-15T13:05:17Z")

</div>

Hey,

Trying to deploy the latest Functionbeat version (7.13.x), and it appears that Functionbeat is ignoring the `AWS_DEFAULT_REGION` environment variable when deploying - it always deploys to North Virginia (us-east-1) instead. The docs ([Functionbeat quick start: installation and configuration | Functionbeat Reference [7.13] | Elastic](https://www.elastic.co/guide/en/beats/functionbeat/7.13/functionbeat-installation-configuration.html#deploy-to-aws)) state that this should be overridable with the `AWS_DEFAULT_REGION` environment variable, as with other AWS tools.

It can be observed that this occurs by the fact that the deployment fails due to being unable to find the log stream I am trying to trigger on (as it is in Ireland) - on debugging it appears both the S3 bucket and CloudFormation stack are both deployed in us-east-1 instead of eu-west-1 despite the environment variable being set correctly.

Env output:

```auto
$ env
(...)
AWS_DEFAULT_REGION=eu-west-1
AWS_ACCESS_KEY_ID=xxx
AWS_SECRET_ACCESS_KEY=xxx
AWS_SESSION_TOKEN=xxx

```

Functionbeat deploy log too long for post - pastebin link: [Functionbeat deploy log - Pastebin.com](https://pastebin.com/isRnwTxe)

Also worth noting that this process worked fine in the previous Functionbeat version (7.12.x) - it appears to have been introduced in 7.13.x.

Does anyone have any ideas?

---

<div class="post-metadata">

**Author:** ![jerm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerm/32/90697_2.png) [@jerm](https://discuss.elastic.co/u/jerm)\
**Post date:** [June 23, 2021, 12:40pm UTC](https://discuss.elastic.co/t/functionbeat-ignores-default-region-only-deploys-to-us-east-1-aws/276002/2 "2021-06-23T12:40:54Z")

</div>

I am experiencing the same issue on 7.13.2 where Functionbeat ignores the default region (ap-southeast-1) set in environment variables and deploys it to us-east-1.

Works fine on 7.12.1.

---

<div class="post-metadata">

**Author:** ![Michael\_Hyatt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_hyatt/32/72891_2.png) [@Michael\_Hyatt](https://discuss.elastic.co/u/Michael_Hyatt)\
**Post date:** [June 25, 2021, 2:07am UTC](https://discuss.elastic.co/t/functionbeat-ignores-default-region-only-deploys-to-us-east-1-aws/276002/3 "2021-06-25T02:07:02Z")

</div>

Same issue here, I reverted to 7.12.1

I raised the issue [Functionbeat ignores default region - only deploys to us-east-1 (AWS) · Issue #26497 · elastic/beats · GitHub](https://github.com/elastic/beats/issues/26497)

---

<div class="post-metadata">

**Author:** ![cjsouza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjsouza/32/91624_2.png) [@cjsouza](https://discuss.elastic.co/u/cjsouza)\
**Post date:** [July 14, 2021, 2:43pm UTC](https://discuss.elastic.co/t/functionbeat-ignores-default-region-only-deploys-to-us-east-1-aws/276002/4 "2021-07-14T14:43:57Z")

</div>

Same error on 7.13.3

---

<div class="post-metadata">

**Author:** ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)\
**Post date:** [July 18, 2021, 7:59pm UTC](https://discuss.elastic.co/t/functionbeat-ignores-default-region-only-deploys-to-us-east-1-aws/276002/5 "2021-07-18T19:59:38Z")

</div>

The PR to resolve the issue hasn't been merged yet. [Expose region in AWS configuration so Functionbeat can deploy the Lamba in the correct place by kvch · Pull Request #26523 · elastic/beats · GitHub](https://github.com/elastic/beats/pull/26523)

---

<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:** [August 15, 2021, 10:00pm UTC](https://discuss.elastic.co/t/functionbeat-ignores-default-region-only-deploys-to-us-east-1-aws/276002/6 "2021-08-15T22:00:24Z")

</div>

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