Control Plane (Console + Monolith)
- Infra code:
infra/aws/ - Component code:
components/monolith/,components/bff_console/,components/identity_service/, etc.
The console web app and backend APIs. A FastAPI monolith on ECS Fargate behind API Gateway.
Architecture
AWS Resources
| Resource | Name Pattern | How to Inspect |
|---|---|---|
| ECS Cluster | {env}-MonolithCluster | ECS |
| ECS Service | {env}-MonolithService | ECS |
| CloudWatch Logs | {env}-monolith-logs | CloudWatch |
| DynamoDB | UsersAccountsTable (no prefix in staging) | DynamoDB |
| DynamoDB | {env}-CustomerIndexConfigTable | DynamoDB |
| DynamoDB | {env}-CustomerClusterPoolTable | DynamoDB |
| DynamoDB | {env}-CustomerClusterAssignmentTable | DynamoDB |
| API Gateway | {env}-ConsoleApi (REST) | API Gateway |
| Cognito | {env}-MarqoUserPool (or imported) | Cognito |
| S3 | {env}-console-static | S3 |
| WAF | {env}-MonolithWebACL | WAF |
DynamoDB Tables
UsersAccountsTable
- pk (S): Account/user partition key
- sk (S): Record type sort key
- Shared across console and controller. No env prefix in staging.
CustomerIndexConfigTable
- pk (S): System account ID
- sk (S): Index config identifier
- Index specifications for hosted Marqo indexes.
Environment Variables (Monolith Container)
Key env vars injected into the Fargate container:
ENVIRONMENT: dev/staging/prodcognito_user_pool_id,cognito_client_id: Cognito pool detailsusers_accounts_table_name: DDB table nameindex_configs_table_name: DDB table namedata_plane_cells: JSON with cell gateway IDsstripe_secret_key_secret_name: Secrets Manager key for Stripeapi_key_encryption_key_secret_name: Secrets Manager key
Typical Investigation Paths
Console not loading:
- Check API Gateway:
aws apigateway get-rest-apis-> find ConsoleApi - Check S3 bucket:
aws s3 ls s3://{env}-console-static/html/ - Check ECS service health:
aws ecs describe-services --cluster {env}-MonolithCluster --services {env}-MonolithService
API returning errors:
- Check monolith logs:
aws logs tail {env}-monolith-logs --follow - Check ECS task status:
aws ecs list-tasksthendescribe-tasks - Check NLB target health
User auth issues:
- Check Cognito:
aws cognito-idp admin-get-user --user-pool-id {pool_id} --username {email} - Check Cognito trigger Lambda logs