# How to use STS regional endpoints in Monitor Amazon Web Services with Amazon CloudWatch metrics?

**URL:** <https://community.dynatrace.com/t/how-to-use-sts-regional-endpoints-in-monitor-amazon-web-services-with-amazon-cloudwatch-metrics/40869>\
**Category:** Cloud platforms\
**Tags:** activegate, aws, dynatrace-saas\
**Created:** [July 26, 2023, 7:28am UTC](https://community.dynatrace.com/t/how-to-use-sts-regional-endpoints-in-monitor-amazon-web-services-with-amazon-cloudwatch-metrics/40869 "2023-07-26T07:28:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yito](https://avatars.discourse-cdn.com/v4/letter/y/ccd318/32.png) [@yito](https://community.dynatrace.com/u/yito)\
**Post date:** [July 26, 2023, 7:28am UTC](https://community.dynatrace.com/t/how-to-use-sts-regional-endpoints-in-monitor-amazon-web-services-with-amazon-cloudwatch-metrics/40869/1 "2023-07-26T07:28:24Z")

</div>

Hi, I’m looking into How to use STS regional endpoints in Monitor Amazon Web Services with Amazon CloudWatch metrics.

Reading at the documentation, it seemed like it could be done.

> **[Monitor Amazon Web Services with CloudWatch metrics](https://docs.dynatrace.com/docs/ingest-from/amazon-web-services-classic/integrate-with-aws/cloudwatch-metrics)**
>
> Integrate metrics from Amazon CloudWatch.

```auto
The AWS Security Token Service is a global endpoint by default. In case of using a regional endpoint, sts.<REGION>.amazonaws.com needs to be accessible.

```

Therefore, we built a Region STS Endpoint in the same Private subnet as EC2 where ActiveGate was set up. However, the connection is made to the default STS global endpoint, resulting in an error.

```auto
2023-07-26 06:48:04 UTC INFO [<xxx00000>] [<vtopology.provider>, PartitionAutoDetection] Updating partition: aws-cn -> aws, for credentials: AWS-monitoring [-xxxxxxxxxxxx]
2023-07-26 06:48:45 UTC WARNING [<xxx00000>] [<vtopology.provider>, AWSFastCheckCallable] Credentials refresh failed: {status: ERROR_BAD_CREDENTIALS, statusInfo: Service failed to assume role provided in credentials, credentials: AWSCredentialsImpl {identifier: ***********, accessKey: null, tenantUUID: xxx00000, iamRole: Dynatrace_monitoring_role, accountId: xxxxxxxxxxx, externalId:***** , label: AWS-monitoring, version: 2.0}, exception: com.amazonaws.SdkClientException: Unable to execute HTTP request: Connect to sts.amazonaws.com:443 [sts.amazonaws.com/209.54.177.164] failed: connect timed out}

```

We have confirmed that the communication between EC2 with ActiveGate and the Region STS endpoint is no problem.

I think I need to add or change some settings, but if anyone knows, please let me know.

Best regards,

Yuki Ito

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [February 12, 2024, 7:13pm UTC](https://community.dynatrace.com/t/how-to-use-sts-regional-endpoints-in-monitor-amazon-web-services-with-amazon-cloudwatch-metrics/40869/2 "2024-02-12T19:13:01Z")

</div>

[@yito](https://community.dynatrace.com/user/13041)&nbsp;were you able to get this resolved?

---

<div class="post-metadata">

**Author:** ![yito](https://avatars.discourse-cdn.com/v4/letter/y/ccd318/32.png) [@yito](https://community.dynatrace.com/u/yito)\
**Post date:** [March 22, 2024, 8:09am UTC](https://community.dynatrace.com/t/how-to-use-sts-regional-endpoints-in-monitor-amazon-web-services-with-amazon-cloudwatch-metrics/40869/3 "2024-03-22T08:09:17Z")

</div>

[@ChadTurner](https://community.dynatrace.com/user/14877)

I’m sorry I had missed your message.

Actually, I haven’t be able to resolved this yet. I would like to know&nbsp;how to use STS regional endpoints in Monitor Amazon Web Services with Amazon CloudWatch metrics.

---

<div class="post-metadata">

**Author:** ![NicolasTr](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@NicolasTr](https://community.dynatrace.com/u/NicolasTr)\
**Post date:** [July 25, 2024, 2:02pm UTC](https://community.dynatrace.com/t/how-to-use-sts-regional-endpoints-in-monitor-amazon-web-services-with-amazon-cloudwatch-metrics/40869/4 "2024-07-25T14:02:31Z")

</div>

I think I am also facing the same issue which leads in the GUI to an “IAM Role does not exist or is misconfigured” is it your use case&nbsp;[@yito](https://community.dynatrace.com/user/13041)&nbsp; ?

From Support team we were given this error logs :

_exception: com.amazonaws.services.securitytoken.model.RegionDisabledException: STS is not activated in this region for account:xxxxxx. Your account administrator can activate STS in this region using the IAM Console._

---

<div class="post-metadata">

**Author:** ![dawid\_kaszubski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dawid_kaszubski/32/34412_2.png) [@dawid\_kaszubski](https://community.dynatrace.com/u/dawid_kaszubski)\
**Post date:** [August 7, 2024, 3:28pm UTC](https://community.dynatrace.com/t/how-to-use-sts-regional-endpoints-in-monitor-amazon-web-services-with-amazon-cloudwatch-metrics/40869/5 "2024-08-07T15:28:22Z")

</div>

Hi [@yito](https://community.dynatrace.com/user/13041),  
You can set the STS endpoint type using the config file by setting these values in the file:

```auto
[default]
sts_regional_endpoints = regional

```

The config file is located at ~/.aws/config on Linux or macOS, or at C:\Users\USERNAME\.aws\config on Windows.
