Skip to content

vk deploy

Terminal window
vk deploy [options]
OptionDescriptionDefault
-s, --stage <stage>Stage name (dev, stage, prod)dev

Deploys your VentureKit application to AWS via CDK. The stage determines which environment config is used:

StageConfig FileTypical Preset
devconfig/dev.tsnano
stageconfig/stage.tsmicro
prodconfig/prod.tsmedium or large
Terminal window
# Deploy dev (default)
vk deploy
# Deploy staging
vk deploy --stage stage
# Deploy production
vk deploy --stage prod

When deploying to prod or production, the CLI displays a warning:

⚠️ Production deployment - please verify your changes

After a successful deployment, the CLI shows:

  • The deployed stage name
  • The API Gateway URL (if available)
✅ Deployed to prod
API URL: https://abc123.execute-api.eu-west-1.amazonaws.com

On first deploy, vk deploy automatically sets up the AWS environment (CDK bootstrap). You never need to run cdk bootstrap manually. If the bootstrap stack is missing, VentureKit handles it transparently:

🚀 Deploying to dev...
✔ Infrastructure template ready
Setting up AWS environment (first-time setup)...
✔ AWS environment ready
✔ Deployed successfully!

If bootstrap fails, the CLI provides actionable guidance (e.g. missing AWS credentials).

  1. Loads your vk.config.ts and resolves the environment config for the stage
  2. Generates a CDK app in .vk/cdk/ with a VentureStack
  3. Checks if the AWS environment is bootstrapped; if not, runs bootstrap automatically
  4. Runs cdk deploy to synthesize and deploy CloudFormation stacks
  5. Creates or updates Lambda functions, API Gateway, and all declared infrastructure

All CDK complexity is hidden — you never interact with CDK directly.