# Error: Not connected to AWS

**URL:** <https://community.dynatrace.com/t/error-not-connected-to-aws/41607>\
**Category:** Cloud platforms\
**Tags:** aws\
**Created:** [September 12, 2023, 1:17pm UTC](https://community.dynatrace.com/t/error-not-connected-to-aws/41607 "2023-09-12T13:17:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [September 12, 2023, 6:22pm UTC](https://community.dynatrace.com/t/error-not-connected-to-aws/41607/2 "2023-09-12T18:22:36Z")

</div>

Hello [@Pawel\_Zalewski](https://community.dynatrace.com/user/66060) under role based auth you can monitor the “default” services without an ActiveGate:

 ![DanielS_0-1694542208370.png](https://global.discourse-cdn.com/dynatrace/original/1X/5111353aa5dc5e151e929b8e04de602fe7310b4d.png)

As you can see Amazon Cloudwatch Logs is non default so you must install and configure an Environment ActiveGate if you want to monitor either or both of the following:

- More than 2,000 AWS resources (AWS service instances)
- [Non-default AWS Cloud services](https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-cloud-platforms/amazon-web-services/amazon-web-services-integrations/aws-service-metrics#aws-non-default)

You need an AG on your EC2 Account:

[Create a role for ActiveGate on the account that hosts ActiveGate](https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-cloud-platforms/amazon-web-services/amazon-web-services-integrations/cloudwatch-metrics#create-role-ag)

1. Download the [YAML file with CloudFormation template](https://dt-url.net/pv0306t).
2. Create the stack in your Amazon Console:
  1. In your Amazon Console, go to CloudFormation.
  2. Go to Stacks and create a new stack with new resources.
  3. Select Template is ready, upload the template you created above, and then select Next.
  4. In Parameters, for Monitored Account ID, enter the ID of the account Dynatrace will monitor. Optionally, adapt other parameters as needed.
  5. Enter a name for your stack, and then select Next twice.
  6. Review your configuration, select I acknowledge that AWS CloudFormation might create IAM resources with custom names, and select Submit.

3. Go to the Amazon EC2 console, right-click an instance hosting your Environment ActiveGate, and select Security \> Modify IAM role.

4. Select the role you created in step 1 and select Update IAM role.

Part 2

[Create a monitoring role for Dynatrace on your monitored account](https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-cloud-platforms/amazon-web-services/amazon-web-services-integrations/cloudwatch-metrics#create-role-dt)

After the Dynatrace\_ActiveGate\_role is created on the account hosting the ActiveGate, create a role for the account to be monitored.

1. Download a YAML file with CloudFormation template from [github role\_based\_access\_AG\_account\_template.yml](https://dt-url.net/f30301j).
2. Create the stack in your Amazon Console:
  1. In your Amazon Console, go to CloudFormation.
  2. Go to Stacks and create a new stack with new resources.
  3. Select Template is ready, upload the template you created above, and select Next.
  4. In Parameters, enter External ID, ActiveGateRoleName and ActiveGateAccountID from the stack created in Step 2.3.2.1. Optionally, adapt other parameters if needed.
  5. Enter a name for your stack, and then select Next twice.
  6. Review your configuration, enable I acknowledge that AWS CloudFormation might create IAM resources with custom names, and select Submit.

Hope it helps!!!

---

_[View the full topic](https://community.dynatrace.com/t/error-not-connected-to-aws/41607)._
