Preview
External datastores are available to customers enrolled in the Query and import archived data with DQL preview. For eligibility, conditions, and enrollment instructions, see the Preview program.
Preview features provide early access to new capabilities and help us refine them based on real-world use—they're not intended for production environments. Behavior, configuration options, and supported integrations may change before general availability.
An external datastore lets you query data stored in your own cloud object storage directly from Grail using DQL, without ingesting or uploading it first. Grail reads the data on demand at query time, so it stays in your cloud account under your control.
This is particularly useful when:
Setting up an external datastore is a one-time administrative task. Once it's configured and access is granted, users can query the data using DQL external data commands just like any other Grail data source.
This page walks you through:
Currently, only AWS S3 buckets are supported as external datastores. Support for other hyperscalers and storage types is planned.
To create and manage external datastores and connections, the following Dynatrace policies are required:
ALLOW storage:external-datastore-definitions:read;ALLOW storage:external-datastore-definitions:write;ALLOW storage:external-datastore-definitions:delete;
Depending on your cloud vendor, check the following additional prerequisites.
To set up a connection in Dynatrace from Grail to AWS, the following Dynatrace policies are required:
ALLOW app-engine:apps:install;ALLOW settings:objects:read, settings:objects:write, settings:schemas:readWHERE settings:schemaId = "builtin:hyperscaler-authentication.connections.aws";ALLOW settings:objects:read, settings:objects:write, settings:schemas:readWHERE settings:schemaId = "builtin:dt-javascript-runtime.allowed-outbound-connections";ALLOW hyperscaler-authentication:aws:authenticate;
For more information, see Access control for Connectors.
For Dynatrace to reach your S3 bucket, you need to add the AWS domain to the external request allow-list.
*.amazonaws.com and select Add.For more information, see Add a host to the allowlist.
You need access to your AWS account with permissions to create an IAM role and attach permission policies to it.
Go to Settings and select Storage Management > External data storage management.
Select New Data Store. A dialog opens.
Enter the datastore details:
| Field | Description |
|---|---|
External data store name | Unique identifier for the datastore. Must be 3–100 characters, start with a letter, and contain only lowercase alphanumeric characters, underscores, or hyphens. Can't be changed after creation. |
Display name | An optional descriptive name for the external data store. |
Data store type |
|
Connection | Select Create a new connection to set up a connection inline, or reuse an existing connection. |
Bucket name | Name of your S3 bucket (example: |
Region | AWS Region your bucket resides in (example: |
Within the datastore form, select Create a new connection in the Connection field. This opens up a connection panel.
Enter a Name for the connection. The name must be unique across all connection types in your environment.
Connections are specific to their use case. Grail requires its own dedicated connection — separate from connections configured for Workflows or OpenPipeline. For more on how connections are shared and administered, see Access control for Connectors.
Select Create. A Connection ID is generated and displayed.
Copy the Connection ID—you need it in the next step—and keep the modal open.
Depending on your cloud vendor, do the following.
Switch to the AWS Console. You need to create an IAM role that trusts Dynatrace and attach an S3 permission policy, then copy the Role ARN back to Dynatrace.
Create an IAM role
To create a new IAM role with the Dynatrace AWS account as a trusted entity:
In the AWS Console, go to IAM > Roles. Select Create role and, under Trusted entity type, select Custom trust policy.
Use the following trust policy, replacing <your-connection-id> with the Connection ID you copied earlier:
{"Version": "2012-10-17","Statement": [{"Effect": "Allow","Principal": {"AWS": "arn:aws:iam::314146291599:root"},"Action": "sts:AssumeRole","Condition": {"StringEquals": {"sts:ExternalId": "<your-connection-id>"}}}]}
Select Next. You can now attach permissions to your new role. Attach a custom policy that grants only the minimum S3 permissions required for the specific bucket and prefixes that this datastore reads. Do not grant AmazonS3ReadOnlyAccess unless its broad scope is intentional.
The following example policy allows the role to list and read objects in a single bucket. Replace <your-bucket> with your bucket name.
{"Version": "2012-10-17","Statement": [{"Effect": "Allow","Action": "s3:ListBucket","Resource": "arn:aws:s3:::<your-bucket>"},{"Effect": "Allow","Action": "s3:GetObject","Resource": "arn:aws:s3:::<your-bucket>/*"}]}
Select Next and enter a Role name.
Select Create role.
On the role overview, search for and select the role you just created. Look for the ARN of the role and copy it.
If you access data through an S3 access point, with the bucket, the access point, and the IAM role all in the same AWS account, one way to set this up is:
s3:ListBucket on arn:aws:s3:<region>:<account-id>:accesspoint/<access-point-name> and s3:GetObject on arn:aws:s3:<region>:<account-id>:accesspoint/<access-point-name>/object/*. If you limited the policy to the bucket ARNs, as in the example above, replace them with these access point ARNs.s3:ListBucket on arn:aws:s3:::<bucket-name> and s3:GetObject on arn:aws:s3:::<bucket-name>/*, with an s3:DataAccessPointArn condition set to the access point ARN.If objects in your bucket are encrypted with SSE-KMS, the IAM role also needs permission to decrypt them:
kms:Decrypt on the KMS key ARN.kms:Decrypt in the key policy. The default key policy allows IAM policies to control access, so for a key in the same account, you usually don't need to change it.For cross-account access, use a customer managed key. The AWS managed key aws/s3 can't be used across accounts. For details, see Allowing users in other accounts to use a KMS key.
You don't need to grant the Dynatrace AWS account access to the key. Only the IAM role in your account uses it.
Return to Dynatrace. In the connection panel, paste the Role ARN into the corresponding field and select Create.
The connection is now created, and you're brought back to the external datastore creation dialog.
Select the created connection in the Connection dropdown and select Save to finish creating the external datastore.
By default, no user can access external data. You must explicitly grant access via Dynatrace IAM policies. You can reference one or more datastores by name and use wildcards:
// Listing objects in the datastoreALLOW storage:external-data:listWHERE storage:store-name MATCH ("your-datastore-name", "aws-external-eu-logs-*", ...);// Access to contentALLOW storage:external-data:loadWHERE storage:store-name MATCH ("your-datastore-name", "aws-external-eu-logs-*", ...);
You can query the metadata of your external datastores with DQL:
fetch dt.system.external_datastores
In case you don't see an external datastore in this list, make sure you have the storage:external-data:list or storage:external-data:load permissions granted.
How you lay out data in your cloud store has a direct impact on query performance and cost. Because Grail reads the data on demand at query time, a good layout lets it skip irrelevant data and read only what a query actually needs.
When you organize data in your cloud store, keep the following in mind.
File size — Aim for files that are neither too small nor too large:
Partitioning and paths — Segment data into a time-based folder or prefix structure so queries can prune data by path:
.../year=2026/month=07/day=24/...).Compression — Compress files to reduce storage footprint and the volume of data transferred at query time, balancing the savings against decompression cost.
You're now set up to load and parse external data with DQL. See DQL commands for external data for the previewExternalList and previewExternalParse commands, file listing patterns, and examples.