AWS X-Ray
AWS X-Ray helps developers analyze and debug distributed applications, such as those built using a microservices architecture. X-Ray provides an end-to-end view of requests as they travel through your application, and shows a map of your application’s underlying components. You can use X-Ray to analyze both applications in development and in production.
In AWS:
Create a new AWS role for the Relyance AI integration, then give that role appropriate permissions and a trust relationship by following these steps:
Under Roles, click Create Role.
Enter these details:
- Account ID: 580082088342 (the Relyance AI AWS account ID that will be used to do the connection to your account).
- External ID: a string, for example
<yourcompany>-relyance.
Click the Next: Permissions button.
Grant read access to X-Ray. Relyance makes three calls, all reads:
Permission Used for xray:GetTraceSummariesfinding traces in the scan window xray:BatchGetTracesfetching those traces xray:GetServiceGraphreading the service map they describe A custom policy with just those three is the least-privilege option, and it is what the Terraform module at the end of this page generates. AWSXRayReadOnlyAccess is the managed equivalent. Avoid AWSXrayFullAccess: it also grants trace writes, which Relyance never makes, and a security review will rightly ask why.
Click the Next: Tags button.
Leave the tags screen empty; click the Next button.
Fill in the Role Name and Description.
Click the Create role button.
Open the newly created Role.
Click the Trust Relationship tab.
Click on the Edit Trust Relationship button.
Change the line with “Principal”: { “AWS”: "arn:aws:iam::580082088342:root" } to “Principal”: {"AWS": "arn:aws:iam::580082088342:user/tenant-prod-access" }
In Relyance AI:
Login to your Relyance AI account.
Navigate to the Settings (bottom-left corner).
Select Integrations.
Search and locate the AWS X-Ray integration card and click on it.
Click on the Add Connection button on the top right.
Provide a meaningful name for the integration and click on the Add button.
In the Overview section, select the integration features you wish to enable for the integration, review the Scope and Permission, and Endpoint details and click on Continue. For more details, see Integration Features.
In the Connection section, provide the appropriate values and click on Continue,
- Connection Name: This property allows you to update the integration specified in Step 6. If you have multiple integrations for the same vendor, you may want to assign distinct names to each. This helps streamline filtering by Discovery Source across the Inventory, Visual Maps, Assets, and Data Flow Analysis pages.
- Rescan Frequency: This property allows you to configure how often Relyance executes scans against this Vendor connection.
- Business Atlas Associations (required): the business entities or products that newly discovered third parties, services and assets from this integration are attributed to. Choose at least one from the Select Associations dropdown — the wizard will not advance past this step without one. For more details, see Business Atlas.
In the Authentication section, choose IAM Assume-Role, then open the Account Details JSON editor and click Continue. It is a JSON array, so one connection can cover several AWS accounts — add an object per account:
[ { "account-id": "", "role-name": "", "external-id": "", "region": "", "product": "" } ]Review the configuration summary from the Completion section and click on Finish.
Confirm the integration Status reflects Connected.





Verify the connection is really working
- A failure at Authenticate is the trust policy or the external ID. The
trust relationship must name
arn:aws:iam::580082088342:user/tenant-prod-accessand its condition must match the external ID on the connection exactly. - Connected but no services discovered. X-Ray data is regional and retained
for 30 days. If the account has no traces in the scan window — or the region on
the connection is not the region the traces are in — the result is empty with no
error, because
GetTraceSummarieslegitimately returns nothing. - A service map with gaps.
GetServiceGraphdescribes what X-Ray itself observed. Services that do not emit trace segments never appear, so gaps here reflect instrumentation coverage rather than a permission problem.
Manage this integration with Terraform
Connections for this integration can be managed as code with the Relyance Terraform provider. Non-secret fields go in auth.params; secret fields go in auth.secrets_wo, which is write-only — never stored in Terraform state. Rotate secrets by bumping auth.secrets_wo_version.
resource "relyance_integration_connection" "aws_xray" {
vendor = "aws_xray"
name = "<your connection name>"
auth = {
method = "account-credentials"
params = {
accounts = jsonencode([
{
account-id = ""
external-id = ""
product = ""
region = ""
role-name = ""
}
])
}
}
scans = { "property-inspection" = { enabled = true } }
}