AWS

Connect AWS to inventory every Bedrock agent, SageMaker endpoint, Lambda function tagged as AI, and Q Developer / Q Business invoker operating in your account. AWS connects with a cross-account, read-only IAM role: you create the role and set its trust policy to allow the Trefur AWS principal plus a per-tenant External ID (both shown on the AWS integration screen in your dashboard), then enter the Region and Role ARN in Trefur. Trefur STS-assumes the role and polls CloudTrail + Bedrock + SageMaker on a 15-minute cadence.

What gets observed

  • Bedrock agents, knowledge bases, guardrails, prompt-management templates.
  • Bedrock invocation telemetry — per-model, per-IAM-principal counts from CloudTrail.
  • SageMaker endpoints, models, training + processing jobs.
  • Lambda functions tagged as AI workloads or invoking Bedrock.
  • Q Developer + Q Business usage events (when the org has Q licensed).
  • CloudTrail management + data events on the above surfaces.

Bedrock prompt + completion content is captured selectively from CloudTrail data events only when InvokeModel data-event logging is enabled. For per-prompt fidelity, route the Bedrock client through the collector LLM proxy or install the Python SDK.

Setup

# 1. In the Trefur dashboard, open Settings → Integrations → AWS. Trefur
#    shows you two values for this tenant:
#      - Trefur AWS principal    (the IAM principal that will assume your role)
#      - External ID             (a per-tenant secret Trefur mints for you)
#    Keep this screen open — you need both in the trust policy below.
#
# 2. In your AWS account, create a read-only IAM role and attach a
#    read-only permissions policy. Built-in policies that are sufficient:
#      - arn:aws:iam::aws:policy/ReadOnlyAccess          (broad)
#      - or the narrow combination below for AI-only:
#        AmazonBedrockReadOnly
#        AWSLambdaReadOnlyAccess
#        AmazonSageMakerReadOnly
#        AWSCloudTrailReadOnlyAccess
#        IAMReadOnlyAccess
#
# 3. Set the role's trust policy to allow the Trefur AWS principal to
#    assume it, gated on the External ID from step 1:
#      {
#        "Version": "2012-10-17",
#        "Statement": [{
#          "Effect": "Allow",
#          "Principal": { "AWS": "<TREFUR_AWS_PRINCIPAL_FROM_DASHBOARD>" },
#          "Action": "sts:AssumeRole",
#          "Condition": {
#            "StringEquals": { "sts:ExternalId": "<EXTERNAL_ID_FROM_DASHBOARD>" }
#          }
#        }]
#      }
#    Note the role's ARN — you enter it in the next step.
# 4. Back in Settings → Integrations → AWS, fill the form:
#      - AWS Region     (e.g. us-east-1)
#      - AWS Role ARN   arn:aws:iam::<your-account-id>:role/TrefurBedrockReader
#
#    The External ID is Trefur-minted and already shown on this screen —
#    you don't type it, you only copy it into your role's trust policy.
#    Trefur STS-assumes the role every 15 minutes to poll. Static access
#    keys are no longer supported — role assumption is the only path.

IAM permissions reference

ServiceRead-only permission
Bedrockbedrock:List* + bedrock:Get* (covered by AmazonBedrockReadOnly)
SageMakersagemaker:List* + sagemaker:Describe* (covered by AmazonSageMakerReadOnly)
Lambdalambda:List* + lambda:Get* (covered by AWSLambdaReadOnlyAccess)
CloudTrailcloudtrail:LookupEvents, cloudtrail:GetTrail*
IAMiam:Get* + iam:List* (to flag over-privileged AI roles)

Multi-account orgs (AWS Organizations)

Add one AWS credential per account. In each account, create a read-only role whose trust policy allows the Trefur AWS principal plus that tenant's External ID, then supply the role's ARN and region in Trefur. Each account gets its own AWS Role ARN entry; the External ID shown in the dashboard is what scopes the cross-account sts:AssumeRole to your tenant.

Troubleshooting

SymptomFix
AccessDenied on sts:AssumeRole when connecting.Confirm the role's trust policy names the exact Trefur AWS principal shown in the dashboard and has a sts:ExternalId condition matching the External ID Trefur minted for this tenant. Also confirm the Role ARN and region are correct and that a read-only permissions policy is attached to the role.
CloudTrail events missing for Bedrock invokes.InvokeModel is logged as a data event, not a management event. Enable Bedrock data events in your trail under CloudTrail → Trail → Data events.
Q Developer / Q Business rows empty.Q Developer events flow via IAM Identity Center audit logs, not CloudTrail. Wire IAM Identity Center as a separate audit-log source (Settings → IAM Identity Center) — coming next quarter.

Back to all integrations.