This is an overview of how to onboard your AWS account in few steps that will generate a deployable CloudFormation template.
The CloudFormation stack will deploy core mandatory resources inside your AWS account (Dynatrace SaaS IAM Monitoring Role, AWS Secrets, Dynatrace API integration Lambda Function).
After a successful deployment, a connection from Dynatrace SaaS to your AWS account will be created. Dynatrace SaaS will then perform API calls to your AWS account to poll and push telemetry into your Dynatrace environment.
The new integration does not deploy or use ActiveGate compute resources inside your AWS account to poll or push telemetry. The experience is transparent and fully managed by Dynatrace SaaS.
Only a Dynatrace account administrator and an AWS admin can successfully complete the initial prerequisites.
Actions in this section can and (should) only be performed by an AWS administrator.
All necessary AWS permissions must be granted to successfully deploy the CloudFormation stacks and associated AWS resources.
In environments where full duty separation is practiced, we recommend that the Dynatrace administrator shares the templates with the platform team/AWS administrators.
Make sure that an AWS user, or a role, used for the CloudFormation stacks deployment is granted with the following (minimum) permission policies.
To allow the least privilege—restricting users creating the AWS connections that follow a specific naming pattern, use the value for <Deployment-Stack-Name-Prefix>. This ensures that any connection created must adhere to this exact naming convention.
{"Version": "2012-10-17","Statement": [{"Sid": "cloudformation0","Effect": "Allow","Action": ["cloudformation:CreateStack","cloudformation:DescribeStacks","cloudformation:UpdateStack","cloudformation:ListStacks","cloudformation:DescribeStackResources","cloudformation:DeleteStack","cloudformation:CreateChangeSet","cloudformation:DescribeChangeSet","cloudformation:ExecuteChangeSet","cloudformation:CreateStackInstances","cloudformation:ListStackInstances","cloudformation:DescribeStackInstance","cloudformation:DeleteStackInstances","cloudformation:CreateStackSet","cloudformation:UpdateStackSet","cloudformation:DescribeStackSet","cloudformation:DescribeStackSetOperation","cloudformation:ListStackSetOperationResults","cloudformation:DeleteStackSet","cloudformation:TagResource","cloudformation:UntagResource"],"Resource": ["arn:aws:cloudformation:*:<AWS-Account-ID>:stackset-target/*","arn:aws:cloudformation:<Deployment-Region>:<AWS-Account-ID>:stackset/Dynatrace*:*","arn:aws:cloudformation:<Deployment-Region>:<AWS-Account-ID>:stack/<Deployment-Stack-Name-Prefix>*/*","arn:aws:cloudformation:*:<AWS-Account-ID>:stack/StackSet-Dynatrace*/*","arn:aws:cloudformation:*:<AWS-Account-ID>:type/resource/*"]},{"Sid": "cloudformation1","Effect": "Allow","Action": ["cloudformation:GetTemplate","cloudformation:ValidateTemplate","cloudformation:GetTemplateSummary"],"Resource": ["*"]},{"Sid": "kms0","Effect": "Allow","Action": ["kms:CreateGrant","kms:RevokeGrant"],"Resource": ["arn:aws:kms:<Deployment-Region>:<AWS-Account-ID>:key/*"]},{"Sid": "lambda","Effect": "Allow","Action": ["lambda:CreateFunction","lambda:UpdateFunctionCode","lambda:GetFunction","lambda:InvokeFunction","lambda:DeleteFunction","lambda:TagResource","lambda:UntagResource"],"Resource": ["arn:aws:lambda:<Deployment-Region>:<AWS-Account-ID>:function:<Deployment-Stack-Name-Prefix>*"]},{"Sid": "iam","Effect": "Allow","Action": ["iam:CreatePolicy","iam:CreatePolicyVersion","iam:SetDefaultPolicyVersion","iam:DeletePolicyVersion","iam:DeletePolicy","iam:CreateRole","iam:UpdateRole","iam:DeleteRole","iam:PassRole","iam:AttachRolePolicy","iam:PutRolePolicy","iam:DetachRolePolicy","iam:DeleteRolePolicy","iam:GetRole","iam:GetPolicy","iam:ListPolicyVersions","iam:TagPolicy","iam:TagRole","iam:UntagPolicy","iam:UntagRole","iam:GetRolePolicy","iam:UpdateAssumeRolePolicy"],"Resource": ["arn:aws:iam::<AWS-Account-ID>:policy/<Deployment-Stack-Name-Prefix>*","arn:aws:iam::<AWS-Account-ID>:role/<Deployment-Stack-Name-Prefix>*"]},{"Sid": "s3","Effect": "Allow","Action": ["s3:GetObject"],"Resource": ["arn:aws:s3:::dynatrace-data-acquisition/aws/deployment/cfn/*"]},{"Sid": "secretsmanager","Effect": "Allow","Action": ["secretsmanager:CreateSecret","secretsmanager:DescribeSecret","secretsmanager:UpdateSecret","secretsmanager:GetSecretValue","secretsmanager:PutSecretValue","secretsmanager:TagResource","secretsmanager:DeleteSecret"],"Resource": ["arn:aws:secretsmanager:<Deployment-Region>:<AWS-Account-ID>:secret:DynatraceAPIAccessToken*","arn:aws:secretsmanager:<Deployment-Region>:<AWS-Account-ID>:secret:DynatraceAPIPlatformToken*"]},{"Sid": "kms1","Effect": "Allow","Action": ["kms:CreateKey","kms:DescribeKey","kms:GetKeyPolicy","kms:PutKeyPolicy","kms:ScheduleKeyDeletion","kms:TagResource","kms:UntagResource","kms:CreateAlias","kms:DeleteAlias","kms:UpdateAlias"],"Resource": "*"},{"Sid": "logs","Effect": "Allow","Action": ["logs:DeleteLogGroup","logs:CreateLogGroup","logs:DeleteLogStream","logs:CreateLogStream","logs:DescribeLogStreams","logs:PutRetentionPolicy","logs:TagResource","logs:ListTagsForResource","logs:DescribeIndexPolicies","logs:DescribeLogStreams","logs:AssociateKmsKey","logs:DisassociateKmsKey"],"Resource": ["arn:aws:logs:<Deployment-Region>:<AWS-Account-ID>:log-group:/aws/lambda/<Deployment-Stack-Name-Prefix>*"]}]}
At this point all, the AWS IAM baseline prerequisites have been completed. Keep in mind that the IAM role/user permissions are needed for each onboarded AWS account.
We recommend that the AWS Admin pre-create those IAM constructs programmatically.
Actions in this section can and (should) only be performed by the Dynatrace account administrator.
The new AWS Platform Monitoring has been integrated with the core Dynatrace Identity & access management (IAM) design.
Learn more about the basic concepts:
In this documentation section context:
A built-in user with View and manage users and groups permission.
A customer-created IAM policy that contains all the (least privilege) permission scopes required to support the CloudAdmin IAM user AWS connection managment in
Settings.
A customer-created custom IAM group where its members will be able to create and manage AWS connections in
Settings.
An IAM user, member of the CloudsAdmins group. The name is used here solely for context; any Dynatrace IAM user can be used.
A non-interactive IAM identity, against which platform tokens will be created.
A built-in IAM policy that contains all the (least privilege) permission scopes required to support the creation of platform tokens for service users.
The authentication and authorization secret used to establish secure communication with the Dynatrace APIs. In our context, two platform tokens are to be created:
Settings PT—allows the programmatic creation and managment of an AWS connection.Ingest PT—allows the programmatic ingest of push-based telemetry from AWS.Create the CloudAdminWrite permission policy:
Go to Account Management and choose the desired Dynatrace account.
Go to Identity & access management > Policy management.
In the upper-right corner, select Create policy.
Policy name: CloudAdminWrite
Policy description: Allow the cloud admin users or groups to fully admin (read and write) all cloud connections, from creation to deletion
Copy and paste the Policy statement below:
ALLOW environment:roles:manage-settings, settings:objects:read,extensions:configurations:read, extensions:configurations:write,extensions:definitions:read, data-acquisition:events:ingest,data-acquisition:logs:ingest, data-acquisition:metrics:ingest,storage:logs:read,storage:metrics:read, storage:smartscape:read,storage:events:read, storage:buckets:read, iam:service-users:use;
The iam:service-users:use can be descoped to allow only a specific service user.
Once you create the service user, the email ID can be used as a condition.
Select Save.
Create the CloudsAdmins group.
Once the CloudsAdmins group is created, select Permissions > Scope and add the CloudAdminWrite and Standard User policies.
Apply Account-Wide or Environment-Wide, then select Save.
Validate: The CloudsAdmins Permissions section should show:
CloudAdminWriteStandard UserAssign your CloudAdmin IAM user as a member of the CloudsAdmins group.
aws-east25-prod-aws-connections-tokens-perm.Data-Acquisition AWS Integration policy.While a single service user can be used to vend multiple platform tokens supporting multiple AWS connections, some organizational policies may mandate the creation of a service user per connection. Consult our IAM documentation to learn more.
At this point, all the Dynatrace IAM baseline (one-off) prerequisites have been completed.
Before you start onboarding, make sure all the prerequisites are completed.
CloudsAdmins IAM Group) and open If the button is grayed out, it means you do not have the proper permissions to create a connection. Please, contact your administrator.
Enter a friendly connection name that is unique (for example, MyEastProd3Account).
Enter the AWS Account ID where you intend to deploy the connection.
Choose the Deployment region.
The deployment region is the AWS Region from which the CloudFormation stack will be deployed.
Select Next.
For now, the onboarding wizard supports two paths:
Recommended: The default and fastest way to onboard your AWS account. The monitoring configuration is an opinionated (immutable) settings flow—only monitored Regions are customizable. This flow provides:
AWS account resources inventory using
Clouds (for supported AWS services).
AWS account resources topology, depicted as rich resource entities using
Clouds (for supported AWS services).
Amazon CloudWatch API metric polling (per enabled region) for common services and their essential metric collection set.
Amazon Data Firehose stream (per enabled region), no auto-log-group subscription.
Metric collection set is a group of metrics assigned to a supported AWS service. Once assigned, all metrics on this collection set will be scheduled for polling. For more information on service and metrics, see CloudWatch metrics.
Advanced: The most fine-grained path to onboard an AWS account. Allows you to fully customize the monitoring configuration to meet any advanced use cases.
Regardless of the selected path, customizing all the supported monitoring settings is possible post-onboarding.
The topology signal is an auto-enabled signal; you can't disable it.
Choose the monitored AWS Regions you want to monitor. The "monitored regions" are the AWS Regions in which Dynatrace can securely poll metrics, topology and push logs from.
You need to enable us-east-1 regardless of your desired monitored regions, since global AWS resources reside in us-east-1.
Select Next.
After a successful onboarding, you'll be able to customize monitored AWS Regions and all other supported monitoring settings.
Select Platform tokens to open a new window redirecting to the platform tokens.
Follow the instructions on how to create a new platform token.
Generate the token for the Service user.
Browse the drop down list and choose the relevant service user, which in our example is: aws-east25-prod-aws-connections-tokens-perm.
While it's possible to create a platform token and link it to your own Dynatrace IAM identity (Myself option), we strongly recommend NOT taking this approach.
Dynatrace IAM interactive users might be deleted. When they are deleted, all their linked platform tokens are also deleted, causing a potential service interruption.
If you have trouble—for example, you can't locate the service user on the dropdown list, or the Service user option is grayed out—see Troubleshooting.
settings:objects:readsettings:objects:writeextensions:configurations:readextensions:configurations:writeextensions:definitions:read
Repeat steps 1 and 2 above and enable the following scopes:
data-acquisition:logs:ingestdata-acquisition:events:ingestdata-acquisition:metrics:ingest
Copy and paste the newly created platform token into the Dynatrace ingest token field.
Select Download and Next.
If the download button is grayed out, that means that the Dynatrace token fields are not populated with platform tokens.
Generating the platform tokens and granting permission scopes will not be effective if the service user is not granted the Data-Acquisition AWS Integration. For details, see Prerequisites.
Go to the AWS Console and log in to the designated AWS account with an AWS IAM user that has all the needed permissions to deploy the CloudFormation stacks.
Select Deploy the CloudFormation in AWS Console.
If you practice roles duty separation, the Dynatrace admin may have no access/permissions to the AWS environment.
In this case, select the Copy Deployment Link.
Share this deeplink and the downloaded platform tokens CSV file with your platform team and/or AWS Admins.
This will allow them to deploy the CloudFormation stack with the wizard configurations that you have set.
Copy the settings and ingest tokens from the downloaded CSV file (the file name will follow the connection friendly name) and paste them into the corresponding CloudFormation parameters (settings token, ingest token).
Deploy the stack.
When the CloudFormation stacks deployment finishes successfully (which can take up to 15 minutes), go back to the wizard and confirm.
If the CloudFormation stack deployment failed, see Troubleshooting.
Successful onboarding involves two elements:
Healthy.CREATE_COMPLETE status.Go to
Clouds. AWS resources with telemetry should start to appear shortly.
See Manage your AWS connections to learn how to manage your newly created connection.
Configure CloudWatch log group subscriptions.
Access our new launchpad to help you get started with the new AWS Platform Monitoring.
Make sure that your Dynatrace IAM user has the proper permission scopes to create and manage a connection. For details, see the Create the Dynatrace IAM baseline section.
If your CloudFormation deployment fails, it's often related to a lack of AWS IAM permissions, AWS Service limits being reached, or Service Control Policies configured in your AWS Organizations.
To run our troubleshooting helper script to discover the root cause
Open AWS CloudShell in the AWS Management Console.
Alternatively, you can run bash with AWS CLI installed.
Download the script:
wget -q https://dynatrace-data-acquisition.s3.us-east-1.amazonaws.com/aws/deployment/cfn/da-activation-check.sh -O da-activation-check.sh && chmod +x ./da-activation-check.sh
Run the script to analyze the failure reason and script output ./da-activation-check.sh --stack-name <activation-stack-name>.
The activation main stack name follows the AWS connection name specified the Dynatrace connections list, for example, connection name: MyEastProd3Account
To find the failure reason manually
If you encounter an error that you cannot resolve on your own, open a Dynatrace support ticket providing the script output.
The best way to solve this issue is to delete the failed stack and repeat the deployment specifying valid tokens as parameters. You can start the deployment from the Dynatrace Settings web UI to generate a new API token.
If you can see in the CloudFormation stack error messages, such as "User: arn:aws: <...> is not authorized to perform: <...> on resource: <...>", it's because you haven't included the proper user/role permissions required from our policy. Update the setup by adding the required AWS permissions, clean the current setup, and restart the process.
To learn how to clean the current setup, see The CloudFormation stack did not complete successfully. I fixed the issue. How do I clean the current setup and start over?
If you see, in the CloudFormation stack, error messages such as "Account XXX has not enabled [Region-XYZ]: ...", clean the current setup, enable that Region or remove it from the deployment parameters, and restart the process.
To learn how to clean the current setup, see The CloudFormation stack did not complete successfully. I fixed the issue. How do I clean the current setup and start over?
If you see, in the CloudFormation stack, error messages such as "You are not subscribed to this service" or "The AWS Access key Id needs a subscription for the service (Service Firehose)", this is because new services, such as Firehose, require it to be enabled on some new accounts. See how to resolve problems when accessing a service in the AWS Management Console.
After enabling it, clean the current setup and restart the process again.
To learn how to clean the current setup, see The CloudFormation stack did not complete successfully. I fixed the issue. How do I clean the current setup and start over?
Please contact us at awscloudmonitoring-preview@dynatrace.com or open a Dynatrace support ticket sharing the errors you experienced.
In the AWS CloudFormation console, delete the master Dynatrace stack. The main stack name follows the connection name in our example MyEastProd3Account. Follow the AWS guidelines on deleting stacks.
Once the stack and its nested stacks are completely deleted
Even if your organization enforces tagging via Service Control Policies or IAM, some of the resources created by CloudFormation do not support tag propagation. For details, please see AWS CloudFormation resource tagging.
Looking at the Destination error logs tab (AWS Firehose console), if you get this message:
Delivery to the endpoint was unsuccessful. See Troubleshooting HTTP Endpoints in the Firehose documentation for more information. Response received with status code. 403: "requestId":"xxxx,"errorMessage":"The authorization token does not provide the necessary permissions. details: missing_scopes=[data-acquisition:logs:ingest]
Verify that
data-acquisition:logs:ingest).data-acquisition:logs:ingest).Your IAM user might not have permission to create platform tokens for (existing) service users. Contact you Dynatrace Admin to learn if the prerequisites were followed. In this case, a specific permission scope must be granted.
The onboarding experience is an evolving core product feature. We are continually working to collect feedback.
During the Preview, we will reach out and ask for feedback. We highly appreciate your willingness to share any suggestions. You can also share your feedback at our dedicated Dynatrace Community channel