Skip to content

COGNITO_IDS

Open in ChatGPTOpen in Claude

const COGNITO_IDS: object

Defined in: packages/constructs/src/construct-ids.ts:41

@axis-tech-co/axis-constructs — construct-ids.ts

Single source of truth for every framework-owned CloudFormation logical ID.

CDK logical IDs (the second arg to new Construct(this, "ID")) are baked into the CloudFormation template. Renaming one after a prod deploy causes CloudFormation to DELETE + CREATE the resource — data loss for DynamoDB tables and Cognito User Pools.

By centralising every ID here and importing it in the constructs that use them, a rename requires editing this file explicitly. That conscious act, combined with the CI check and snapshot tests, makes accidental renames structurally impossible.

  1. Never change a value in this file without a MAJOR version bump + migration guide entry in MIGRATION_GUIDE.md.
  2. Dynamic or derived IDs (including ones that incorporate user-supplied names/constructIds) are represented as typed factory functions — still governed by this file, just parameterised.
  3. For constructs like AtfDynamo and AtfSqs, the user supplies the base constructId, but the framework-owned pattern/suffixes derived from that value (e.g. Queue_{id}, Dlq_{id}) still live in this file. Only the raw user-provided base value itself is not hardcoded here.
  4. Stack-level IDs live in the stacks section — separate namespace from construct-level IDs.

readonly client: "Client" = "Client"

App client

readonly domain: "Domain" = "Domain"

Hosted UI domain

readonly group: (groupName) => string

Dynamic: one per extra group declared in groups[]

string

string

readonly superAdminGroup: "SuperAdminGroup" = "SuperAdminGroup"

Super-admin group — always created automatically

readonly userPool: "UserPool" = "UserPool"

Main Cognito User Pool

© 2026 Axis Tech. Powered by axis-tech.co.