AWS Credentials & Bootstrap
An Axis project is a standard AWS CDK app — deploying it needs AWS credentials, a region, and a one-time cdk bootstrap per account/region pair. Nothing here is Axis-specific magic; Axis just makes the environment selection explicit and typed.
Credentials
Section titled “Credentials”Use whichever standard AWS credential mechanism your team already uses — the CDK CLI picks them up like any AWS tool:
- Named profiles in
~/.aws/credentials/~/.aws/config, selected withAWS_PROFILE=myprofileor--profile myprofileoncdkcommands. - AWS IAM Identity Center (SSO) via
aws sso loginwith a configured profile. - Environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_SESSION_TOKEN) — typical for CI.
Never commit credentials to the project. The scaffolded .gitignore and the token rules from Install apply the same discipline to AWS secrets: long-lived keys don’t belong in the repository, in project config files, or in shell rc files.
Environments — --context env=dev|prod
Section titled “Environments — --context env=dev|prod”Every Axis project ships typed per-environment config in config/dev-config.ts and config/prod-config.ts, selected at synth time through CDK context and loaded by config/loader.ts (createEnvLoader):
npx cdk synth --context env=devThe environment name flows through BaseEnvConfig.stageName into physical resource names (${baseName}-${stageName}), SSM parameter paths, and removal policies (dev tears down cleanly; prod retains stateful resources). Before your first deploy, open config/dev-config.ts and review the values the scaffold seeded — app name, region, and any starter-specific settings.
Bootstrap — one time per account/region
Section titled “Bootstrap — one time per account/region”CDK needs a small set of bootstrap resources (an asset bucket and deployment roles) in each account/region combination before the first deploy. From the project root:
npx cdk bootstrap --context env=devThis is the same command the CLI prints in its post-scaffold next steps. Run it once per account/region; re-running is a safe no-op that upgrades the bootstrap stack if needed.
Deploy and verify
Section titled “Deploy and verify”The scaffolded package.json wraps the common CDK invocations so the environment context is never forgotten:
{ "cdk:synth": "cdk synth", "cdk:diff": "cdk diff --context env=dev", "cdk:deploy": "cdk deploy --all --context env=dev"}pnpm run cdk:deployDeploy order between stacks does not need hand-holding: cross-stack references travel through SSM Parameter Store, not CloudFormation exports, so stacks stay independently deployable. See Stacks & SSM Wiring for the model.
Walk the whole loop end-to-end in the Tutorial.
© 2026 Axis Tech. Powered by axis-tech.co.