Single KMS Key per Environment
AWS KMS Key Design – Single CMK per Environment
This summary analyzes the pros and cons of using one customer-managed KMS key (CMK) per environment (for example, one for dev, one for test, and one for prod).
Pros
- Simple to operate: Fewer keys to create, tag, monitor, rotate, and back up (if using multi-Region keys).
- Lower overhead: Simplified management of key policies, aliases, and grants; easier onboarding for new services (“use the env key”).
- Cost control: Fewer customer-managed keys mean fewer monthly key charges and less API activity from key rotation.
- Uniform guardrails: Single enforcement point for environment-wide restrictions, such as disallowing cross-account use in production.
Cons
- Blast radius: Disabling or deleting the environment key can impact all dependent resources (EBS, RDS, S3, Secrets Manager, etc.).
- Least-privilege friction: Difficult to grant narrow permissions to one app without exposing the key to others.
- Grant sprawl & policy complexity: Many principals on a shared key lead to long, hard-to-audit policies and increased risk of misconfiguration.
- Throughput & quota coupling: All workloads share key usage limits; one busy app can throttle others.
- Lifecycle coupling: One app’s needs (e.g., faster rotation, export restrictions) can’t be implemented independently.
- Compliance segmentation: Workloads with different regulatory requirements should not share a single key.
- Incident response & forensics: Noisy CloudTrail/KMS logs make it harder to trace who used the key for what.
- Migration & decommissioning pain: Shared keys complicate workload movement or retirement.
When a Single Environment Key is Reasonable
- Small, low-risk workloads with similar data classifications.
- Short-lived development or test environments prioritizing simplicity.
- Sandbox environments with limited principals and low traffic.
When to Avoid It (Strongly)
- Production environments with multiple independent or sensitive workloads.
- Mixed regulated and non-regulated data (PCI, HIPAA, CJIS, etc.).
- High-throughput workloads that risk hitting shared KMS request quotas.
- Teams requiring separate key administrators or duty separation.
Pragmatic Compromise Patterns
- Per-workload or per data-class keys per environment: Limits blast radius and clarifies ownership.
- Per-service keys for high-volume services: Assign separate CMKs for S3, EBS, RDS, or Secrets Manager where appropriate.
- Multi-Region keys for DR: Use per-workload or per-data-class keys, not one global key for all of prod.
- Clear aliasing & tagging: Use aliases like
alias/appA-prodand tags forEnvironment,DataClass, andOwner. - Tight policies: Enforce admin boundaries through key policies; use grants for runtime access and avoid broad permissions.
- Rotation strategy: Enable annual rotation where needed, rotating keys independently per workload.
Bottom Line
Using a single CMK per environment offers operational simplicity but increases risk and reduces isolation.
For most production scenarios, prefer per-workload or per data-classification keys per environment,
and introduce multi-Region keys only where disaster recovery requires it.
Leave a Reply