Data Safety
Data safety levels control how cautiously VentureKit treats your data — including resource removal policies, deletion protection, and backup behavior.
Levels
Section titled “Levels”| Level | Removal Policy | Deletion Protection | Use Case |
|---|---|---|---|
relaxed | Destroy | No | Development and testing |
standard | Retain | Yes | Staging |
strict | Retain | Yes | Production |
Set data safety in your environment config:
export const dev: EnvConfigInput = { preset: 'nano', dataSafety: 'relaxed', // Resources destroyed on teardown};
// config/prod.tsexport const prod: EnvConfigInput = { preset: 'medium', dataSafety: 'strict', // Resources retained, deletion protected};What Each Level Controls
Section titled “What Each Level Controls”relaxed
Section titled “relaxed”- 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
standard
Section titled “standard”- 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
strict
Section titled “strict”- CloudFormation removal policy: Retain
- Deletion protection is enabled
- Additional safeguards may be applied (backup retention, point-in-time recovery, etc.)
- Required for production environments
Recommended Mapping
Section titled “Recommended Mapping”| Environment | Data Safety | Why |
|---|---|---|
dev | relaxed | Fast iteration, disposable resources |
stage | standard | Production-like but recoverable |
prod | strict | Protect customer data at all costs |