Skip to content

AWS connector

What this connector reads

The AWS connector enumerates the AI workloads provisioned in your AWS account: Bedrock custom models, SageMaker endpoints, and SageMaker notebook instances across the regions you list. We see their names, ARNs, regions, status, and configuration metadata — the same fields the AWS Console shows on the resource detail page.

A passive twin (passive-aws) is created automatically alongside the active connection. It reads CloudTrail for management-plane calls to AWS AI services over a 90-day lookback, picking up shadow AI like a Lambda in a sandbox account calling Comprehend or Rekognition without anyone registering an inventory entry. The passive collector requires the additional managed policy AWSCloudTrail_ReadOnlyAccess on the same role; if you skip that, the active inventory still works and the passive twin simply returns nothing.

What you (the customer) need to do

You will need an AWS account admin (or an IAM admin) to create the cross-account IAM Role.

  1. In Secruna, open Connections → Connect AWS. The dialog shows a randomly generated External ID (a 32-hex-character string scoped to this connection only). Copy it.
  2. The dialog also shows a JSON trust policy template. Copy it. (screenshot placeholder TODO)
  3. In your AWS account console, go to IAM → Roles → Create role → Custom trust policy. Paste the trust policy. Replace SECRUNA-ACCOUNT-ID with the account number we share with you on contract — it is fixed and we publish it on the subprocessor page when you sign.
  4. Attach the AWS-managed policies you want active:
  5. AmazonBedrockReadOnly — required for Bedrock model and custom-model discovery.
  6. AmazonSageMakerReadOnly — required for SageMaker endpoint and notebook discovery.
  7. AWSCloudTrail_ReadOnlyAccess (optional but recommended) — required for the passive shadow-AI collector. If you do not attach this, the active discovery still works.
  8. Name the role (suggested: SecrunaDiscovery) and create it.
  9. Copy the Role ARN. Paste it back into the Secruna dialog and click Connect. We immediately try sts:AssumeRole to validate; if it works, the connection moves to active.

By default we scan us-east-1, us-west-2, and eu-west-1. To change the region list, contact support — multi-region configuration via the UI is on the roadmap.

Permissions / scopes requested

The IAM Role pattern means you control the exact permissions, so this section documents the permissions Secruna actually exercises during discovery. None of the calls below are write-mutating.

Service API call Why
sts AssumeRole We exchange your role's trust grant for short-lived (1h) credentials at the start of every run.
bedrock ListCustomModels Active inventory of Bedrock custom models.
sagemaker ListEndpoints Active inventory of SageMaker serving endpoints.
sagemaker ListNotebookInstances Active inventory of SageMaker notebooks.
cloudtrail LookupEvents (per-region, filtered by EventSource) Passive shadow-AI detection.

The passive collector filters CloudTrail to these AI service event sources only:

bedrock.amazonaws.com           bedrock-runtime.amazonaws.com
sagemaker.amazonaws.com         sagemaker-runtime.amazonaws.com
comprehend.amazonaws.com        rekognition.amazonaws.com
textract.amazonaws.com          polly.amazonaws.com
transcribe.amazonaws.com        lex.amazonaws.com
lexv2.amazonaws.com             kendra.amazonaws.com
personalize.amazonaws.com

The trust policy generated for you uses an External ID unique to your connection — this is the AWS-recommended pattern for cross-account access between distinct organisations and prevents the confused deputy class of attacks even if our account is compromised.

What we do NOT touch

  • Bedrock prompt or completion content. We list models, not invocations. We do not read CloudWatch Logs.
  • SageMaker training data, model artefacts, or notebook contents. We list endpoints and notebooks; we do not download model.tar.gz or read S3 model buckets.
  • Other AWS services. We do not enumerate EC2, S3 (except through SageMaker model package metadata), DynamoDB, Lambda, etc.
  • Secrets Manager, Parameter Store, or KMS keys in your account.
  • IAM users or roles beyond the role you provisioned for us.
  • Organizations, Accounts, Billing, or any cross-account metadata outside the role you scoped.

How to revoke access

  1. In your AWS account, delete the IAM Role you created (e.g., SecrunaDiscovery). Once deleted, every subsequent sts:AssumeRole from our side fails immediately. This is the source of truth.
  2. In Secruna, open Connections and click Disconnect on the AWS row. The passive twin is disconnected at the same time.
  3. Within 90 days every artefact collected through this connection is purged. See data retention policy.

If you only want to narrow coverage rather than revoke (for example, drop CloudTrail access while keeping Bedrock+SageMaker), detach the relevant managed policies from the role; the next discovery run reflects the new scope automatically.

Troubleshooting

Error you see Likely cause Fix
Connection: failed — sts:AssumeRole denied Role's trust policy still has the placeholder SECRUNA-ACCOUNT-ID, or the External ID does not match. Compare the External ID in the Secruna UI to the one in your trust policy. Ensure the AWS account ID we shared is in the Principal.AWS ARN.
Connection active but discovery yields 0 resources The role has no Bedrock/SageMaker read permissions. Attach AmazonBedrockReadOnly and/or AmazonSageMakerReadOnly to the role.
Passive twin returns 0 events Either no AI calls happened in the last 90 days or the role lacks AWSCloudTrail_ReadOnlyAccess. Attach AWSCloudTrail_ReadOnlyAccess. If still empty, your account genuinely has no AI usage in the lookback window.
Throttling: Rate exceeded in run history Other tooling in your account is hammering the AWS APIs Secruna queries. Discovery retries automatically; persistent failures need an AWS support case to raise the per-account API limits.
Region not enabled for this account We tried to scan a region your account hasn't opted into. Reply to a support email with the region list you want; we'll scope discovery to the regions you do use.
  • Subprocessor list — your AWS account is controller-controlled: AWS is your subprocessor, not ours.
  • DPA template — Annex II details the metadata categories produced by this connector.