Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.68 KB

File metadata and controls

45 lines (30 loc) · 1.68 KB

TableTheory CDK Multi-language Demo

Deploys two DynamoDB tables and four Lambdas:

  • one shared application table exercised by Go, Node.js 24, and Python 3.14
  • one TTL-driven evidence table with a DynamoDB Streams to S3 archival Lambda

This is the deployable “proof” that the multi-language TableTheory stack can share a single table without drift while also supporting TTL-based retention pipelines.

This demo also exercises:

  • Encryption (KMS envelope, cross-language decrypt)
  • Batching (BatchWrite + BatchGet)
  • TTL + archival (DynamoDB TTL, Streams, S3 lifecycle to Glacier)
  • Transactions (TransactWrite)

Commands

From the repo root:

  • Install deps: npm --prefix examples/cdk-multilang ci
  • Synthesize: npm --prefix examples/cdk-multilang run synth
  • Test: npm --prefix examples/cdk-multilang run test
  • Deploy (writes cdk.outputs.json): AWS_PROFILE=... npm --prefix examples/cdk-multilang run deploy -- --profile $AWS_PROFILE --outputs-file cdk.outputs.json

After deploy, the stack outputs three Function URLs. Use them to GET/PUT items:

  • GET ?pk=...&sk=...
  • PUT with JSON body: {"pk":"...","sk":"...","value":"...","secret":"..."}

Additional endpoints:

  • PUT /enc (encryption demo; same payload as PUT /)
  • POST /batch (batch write + batch get): {"pk":"...","skPrefix":"...","count":3,"value":"...","secret":"..."}
  • POST /tx (transaction write): {"pk":"...","skPrefix":"...","value":"...","secret":"..."}

Smoke test

Runs an end-to-end cross-language check (encryption + batch + tx) and verifies the encrypted attribute is stored as an envelope in DynamoDB.

AWS_PROFILE=... bash examples/cdk-multilang/scripts/smoke.sh