# Metricbeat AWS module endpoint not working correctly

**URL:** <https://discuss.elastic.co/t/metricbeat-aws-module-endpoint-not-working-correctly/261589>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 19, 2021, 8:00pm UTC](https://discuss.elastic.co/t/metricbeat-aws-module-endpoint-not-working-correctly/261589 "2021-01-19T20:00:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![cjm3625](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjm3625/32/82561_2.png) [@cjm3625](https://discuss.elastic.co/u/cjm3625)\
**Post date:** [January 19, 2021, 8:00pm UTC](https://discuss.elastic.co/t/metricbeat-aws-module-endpoint-not-working-correctly/261589/1 "2021-01-19T20:00:25Z")

</div>

aws.yml is as follows

```auto
  regions: us-iso-east-1
  endpoint: us-iso-east-1.c2s.ic.gov
  period: 5m
  metricsets:
    - ec2

```

The error is ListMetricsRequest failed: send request failed. followed by a proxy error driven by an incorrect URL because this is running in us-iso-east-1 and doesn't push the config to the metric checks. My logs show the iam/sts calls are working going to [iam.us-iso-east-1.c2s.ic.gov](http://iam.us-iso-east-1.c2s.ic.gov) and [sts.us-iso-east-1.c2s.ic.gov](http://sts.us-iso-east-1.c2s.ic.gov) however the calls I see going to metrics are [ec2.us-iso-east-1.amazonaws.com](http://ec2.us-iso-east-1.amazonaws.com) and [monitoring.us-iso-east-1.amazonaws.com](http://monitoring.us-iso-east-1.amazonaws.com). This leads me to believe that the endpoint is not getting to the metric checks and the region is not pushing to the initial IAM checks.

---

<div class="post-metadata">

**Author:** ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)\
**Post date:** [January 20, 2021, 1:03am UTC](https://discuss.elastic.co/t/metricbeat-aws-module-endpoint-not-working-correctly/261589/2 "2021-01-20T01:03:26Z")

</div>

Could you try with this endpoint please? We do realize there is a bug in the endpoint part and PR to fix it is on its way 🙂 [Deprecate aws\_partition and use endpoint,regions instead by kaiyan-sheng · Pull Request #23539 · elastic/beats · GitHub](https://github.com/elastic/beats/pull/23539)

> [@cjm3625](#):
>
> ```auto
> regions: us-iso-east-1
> endpoint: c2s.ic.gov
> period: 5m
> metricsets:
> - ec2
> 
> ```

---

<div class="post-metadata">

**Author:** ![cjm3625](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjm3625/32/82561_2.png) [@cjm3625](https://discuss.elastic.co/u/cjm3625)\
**Post date:** [January 20, 2021, 1:08pm UTC](https://discuss.elastic.co/t/metricbeat-aws-module-endpoint-not-working-correctly/261589/3 "2021-01-20T13:08:29Z")

</div>

I have tried that config and the issue then gets worse as the iam and sts calls will also fail as they need to use the region in the iso env. The same issue is also present with the above config that the metric calls do not hit that endpoint. Will the endpoint PR above correct both of these issues?  
So the calls need to be to [sts.iam.us-iso-east-1.c2s.ic.gov](http://sts.iam.us-iso-east-1.c2s.ic.gov), [iam.us-iso-east-1.c2s.ic.gov](http://iam.us-iso-east-1.c2s.ic.gov), and [ec2.iam.us-iso-east-1.c2s.ic.gov](http://ec2.iam.us-iso-east-1.c2s.ic.gov) for example

---

<div class="post-metadata">

**Author:** ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)\
**Post date:** [January 20, 2021, 6:56pm UTC](https://discuss.elastic.co/t/metricbeat-aws-module-endpoint-not-working-correctly/261589/4 "2021-01-20T18:56:39Z")

</div>

With this PR, `endpoint` and `regions` will be required for your case:

```auto
- module: aws
  period: 5m
  endpoint: c2s.ic.gov
  regions: us-iso-east-1
  metricsets:
    - ec2

```

This will call `iam.c2s.ic.gov` and `ec2.us-iso-east-1.c2s.ic.gov` for example. I don't think there will be anything like `ec2.iam.us-iso-east-1.c2s.ic.gov` though with two service names.

---

<div class="post-metadata">

**Author:** ![cjm3625](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjm3625/32/82561_2.png) [@cjm3625](https://discuss.elastic.co/u/cjm3625)\
**Post date:** [January 20, 2021, 8:37pm UTC](https://discuss.elastic.co/t/metricbeat-aws-module-endpoint-not-working-correctly/261589/5 "2021-01-20T20:37:21Z")

</div>

Sorry that was a typo on my part we need iam and sts calls to include the region, like [iam.us-iso-east-1.c2s.ic.go.c2s.ic.gov](http://iam.us-iso-east-1.c2s.ic.go.c2s.ic.gov) and [sts.us-iso-east-1.c2s.ic.gov](http://sts.us-iso-east-1.c2s.ic.gov). Also the endpoint is not reflected on the metric calls as we are seeing calls to ec2 hit [ec2.us-iso-east-1.amazonaws.com](http://ec2.us-iso-east-1.amazonaws.com) when endpoint is set to [c2s.ic.gov](http://c2s.ic.gov).

---

<div class="post-metadata">

**Author:** ![cjm3625](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjm3625/32/82561_2.png) [@cjm3625](https://discuss.elastic.co/u/cjm3625)\
**Post date:** [January 25, 2021, 3:53pm UTC](https://discuss.elastic.co/t/metricbeat-aws-module-endpoint-not-working-correctly/261589/6 "2021-01-25T15:53:52Z")

</div>

Is it possible to have the region included in the iam and sts calls? in the aws-iso the iam and sts addresses include the region

---

<div class="post-metadata">

**Author:** ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)\
**Post date:** [January 25, 2021, 5:43pm UTC](https://discuss.elastic.co/t/metricbeat-aws-module-endpoint-not-working-correctly/261589/7 "2021-01-25T17:43:52Z")

</div>

> Also the endpoint is not reflected on the metric calls as we are seeing calls to ec2 hit [ec2.us-iso-east-1.amazonaws.com](http://ec2.us-iso-east-1.amazonaws.com/) when endpoint is set to [c2s.ic.gov](http://c2s.ic.gov/).

Yes that's a bug also get fixed in the same PR. Please feel free to test it and leave comments in the PR or here! Thanks!!!

---

<div class="post-metadata">

**Author:** ![cjm3625](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjm3625/32/82561_2.png) [@cjm3625](https://discuss.elastic.co/u/cjm3625)\
**Post date:** [January 25, 2021, 6:12pm UTC](https://discuss.elastic.co/t/metricbeat-aws-module-endpoint-not-working-correctly/261589/8 "2021-01-25T18:12:59Z")

</div>

How do I get those changes into my environment? I use the beat rpm files to install the packages.

---

<div class="post-metadata">

**Author:** ![cjm3625](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjm3625/32/82561_2.png) [@cjm3625](https://discuss.elastic.co/u/cjm3625)\
**Post date:** [January 26, 2021, 8:43pm UTC](https://discuss.elastic.co/t/metricbeat-aws-module-endpoint-not-working-correctly/261589/9 "2021-01-26T20:43:56Z")

</div>

Is it possible to have the region included in the iam and sts calls? in the aws-iso the iam and sts addresses include the region as there is no global endpoint for those services

---

<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:** [February 23, 2021, 10:44pm UTC](https://discuss.elastic.co/t/metricbeat-aws-module-endpoint-not-working-correctly/261589/10 "2021-02-23T22:44:05Z")

</div>

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