Skip to content

AWS Integration

Connect an AWS account and Topolix will discover the deployed infrastructure — networks, compute, data stores, messaging, and the dependencies between them — and generate an architecture diagram as code.

Area Resources Relationships
Networking VPCs, subnets, security groups, NAT gateways Security-group traffic rules, VPC membership
Edge CloudFront distributions, API Gateway (REST, HTTP, WebSocket) CloudFront origins (S3, load balancers, APIs), API → Lambda / load balancer integrations
Load balancing Application and network load balancers, target groups Load balancer → target group → instance / Lambda / ECS service
Compute EC2 instances, ECS clusters and services, EKS clusters, Lambda functions, Step Functions ECS service → cluster, state machine → invoked resources
Data RDS instances and clusters, DynamoDB tables, ElastiCache clusters, S3 buckets RDS instance → cluster
Messaging SQS queues, SNS topics, Kinesis streams, EventBridge buses and rules Event source → Lambda, SNS → subscriber, queue → dead-letter queue, rule → target

Only the regions you select are scanned. Global services (CloudFront, S3) are scanned once, and S3 buckets are limited to the selected regions.

Go to Settings → AWS and click Connect Account. Two authentication methods are supported.

Topolix exchanges its Google Cloud workload identity for temporary credentials on a read-only IAM role in your AWS account. Topolix does not need its own AWS account or AWS access keys. You need permission to create a role in the account you want to map.

  1. Enter a name, keep IAM Role selected, choose the regions, and click Continue.
  2. Click Download CloudFormation template. This template creates a role with the exact trust and discovery permissions for this connection.
  3. In your AWS account’s CloudFormation console, create a stack by uploading that template. Acknowledge creation of IAM resources.
  4. Copy RoleArn from the stack’s Outputs, paste it into Topolix, and click Save & Test Access.

Alternatively, expand Create the role manually and use the displayed trust and permissions policies. Google is a built-in AWS identity provider; no IAM OIDC provider resource is required. Do not reuse another connection’s trust policy.

For accounts where cross-account roles are not an option, provide the access key ID and secret access key of an IAM user with the permissions policy attached. The secret is encrypted at rest and never returned by the API.

Click Test Access to verify the credentials. Topolix calls sts:GetCallerIdentity and shows the AWS account ID the connection resolves to.

Turn on the connection’s mapping toggle to create a source-backed diagram in a new folder and start a generation job. You can rename the diagram and move it to another folder; refresh preserves those choices. Topolix will:

  1. Authenticate — assume the role (or use the access keys) and confirm the account
  2. Discover — run every collector across the selected regions in parallel
  3. Map relationships — link resources across services by ARN and DNS name
  4. Generate DSL — group resources by region and VPC and draw the request path, data stores, and messaging flows

If a permission is missing or a region is not enabled for the account, that service is skipped with a warning instead of failing the whole run.

AWS diagrams can be combined with GitHub and database diagrams in a Unified Diagram.

Click Refresh in Settings → AWS, or the diagram’s source details, to rediscover the account and update the diagram. Existing node IDs are preserved where possible.

Only workspace owners can configure, test, map, refresh, disable, or delete connections. Workspace members can view their diagrams. Disabling a connection stops pending results from being saved and keeps the existing diagram. Unmapping can keep it as an ordinary editable diagram. Refresh is manual; there is no scheduled AWS synchronization.

Discovery is bounded per service and region; large accounts can produce a partial inventory. Missing permissions, disabled regions and truncation appear as job warnings. An entirely failed discovery does not replace the diagram. Only commercial AWS regions are supported.

  • Discovery is strictly read-only; the permissions policy contains only Describe, List, and Get actions.
  • Roles trust the pinned Topolix Google service-account ID and a server-generated audience unique to each connection. AWS validates Google’s token signature. Topolix rejects roles that accept an incorrect audience, and also restricts each session to the discovery policy. Identity tokens and temporary credentials are only used in memory. See AWS Google workload federation and AssumeRoleWithWebIdentity.
  • Access-key secrets are encrypted at rest with Fernet. Saving keys fails if encryption is not configured, and unreadable ciphertext never falls back to plaintext. Secrets are excluded from API responses and validation errors.
  • Configuration that may contain secrets — Lambda environment variables, Step Functions definitions, SNS e-mail or HTTP endpoints — is never stored or sent to the AI model.
  • Deleting a connection removes its stored credentials. Revoke the IAM role or access key in AWS to cut off access entirely.

For role connections, set AWS_GOOGLE_SERVICE_ACCOUNT_ID to the numeric unique ID of the Google service account assigned to the backend (not its email or the node service account). The backend obtains identity tokens from the fixed Google metadata endpoint and refuses tokens with a different subject, authorized party, audience, issuer, or an expired lifetime. AWS STS calls are unsigned; no platform AWS credentials are needed or read.

On GKE, enable Workload Identity on both the cluster (workload_pool) and its node pool (workload_metadata_config.mode = "GKE_METADATA"). Annotate the backend Kubernetes service account with the Google service-account email and grant that Kubernetes identity roles/iam.workloadIdentityUser on the Google service account. Verify this separately in every deployment namespace. Enabling only the cluster setting can leave pods using the shared node identity, which Topolix rejects.

Role connections require that Google workload environment; ordinary local development can exercise the flow with mocked tests. A real connection test requires a customer AWS role created from its generated template.

DB_ENCRYPTION_KEY must be a valid Fernet key for access-key connections. Keep this key stable across restarts and replicas. It must not be exposed to the browser or generation runtime.

AWS_STS_REGION defaults to us-east-1. Session duration is 900–3600 seconds. AWS_MAX_RESOURCES_PER_TYPE defaults to 500 and AWS_MAX_CONCURRENT_COLLECTORS to 8. Discovery also has a cumulative item budget and time limit per collector to bound nested resource scans.