AWS CDK bootstrap for Gen3 platform infrastructure, IAM, and secrets initialization.
- Core infrastructure stack: S3 buckets, KMS keys, SNS/SQS wiring, and Gen3 secrets bootstrap
- IAM stack: roles and policies for Gen3 services
- Optional replication stack for cross-account S3 replication
- Node.js 18+ and npm
- AWS credentials with permissions to deploy CDK stacks
- Account already bootstrapped for CDK
Provide a JSON config via CDK context. Start from config/example.public.json.
Key fields:
project,application,ownernamingprefixes for SSM and Secrets Managerenvironments(account/region)stages(per-environment bootstrap settings)bootstrap.featurestoggles for which secrets are createdbootstrap.replicationsettings (optional)
Install deps:
npm installSynthesize:
npx cdk synth -c config=./config/example.public.jsonDeploy all stacks:
npx cdk deploy -c config=./config/example.public.jsonDeploy a single stack:
npx cdk deploy -c config=./config/example.public.json SampleTestBootstrapInfraThe Gen3Secrets construct invokes the lambda in lambda/gen3-secrets/onEvent.ts to create
Gen3 secrets when enabled via bootstrap.features.
Dry run (no AWS calls, for local testing):
- Set
DRY_RUN=1in the lambda environment, or - Pass
dryRun: truein the custom resource props
Run Jest:
npm test- Config is validated at runtime; invalid configs will fail fast with explicit errors.
- Replication is created only when
bootstrap.replication.enabledis true.