Skip to content

Data Safety

Data safety levels control how cautiously VentureKit treats your data — including resource removal policies, deletion protection, and backup behavior.

LevelRemoval PolicyDeletion ProtectionUse Case
relaxedDestroyNoDevelopment and testing
standardRetainYesStaging
strictRetainYesProduction

Set data safety in your environment config:

config/dev.ts
export const dev: EnvConfigInput = {
preset: 'nano',
dataSafety: 'relaxed', // Resources destroyed on teardown
};
// config/prod.ts
export const prod: EnvConfigInput = {
preset: 'medium',
dataSafety: 'strict', // Resources retained, deletion protected
};
  • CloudFormation removal policy: Destroy — resources are deleted when the stack is removed
  • No deletion protection on databases, S3 buckets, or other stateful resources
  • Ideal for development where you frequently tear down and recreate environments
  • CloudFormation removal policy: Retain — resources are kept even if the stack is removed
  • Deletion protection is enabled on databases and other critical resources
  • Suitable for staging environments where data loss is inconvenient but not catastrophic
  • CloudFormation removal policy: Retain
  • Deletion protection is enabled
  • Additional safeguards may be applied (backup retention, point-in-time recovery, etc.)
  • Required for production environments
EnvironmentData SafetyWhy
devrelaxedFast iteration, disposable resources
stagestandardProduction-like but recoverable
prodstrictProtect customer data at all costs