Interview Prep/DevSecOps/Cloud Security Posture

How do you structure KMS keys for production?

IntermediateProductionCloud Security Posture
Answer

Use customer-managed keys (CMKs) for sensitive data, so we control the key policy, rotation and audit. AWS-managed keys are fine for low-risk data but their policy cannot be changed.

  • Separate keys per environment and per data domain (e.g. prod-payments, prod-logs), not one key for everything.
  • Key policy grants administration and usage to different roles; the root account principal is kept so IAM policies work and the key cannot be orphaned.
  • Automatic rotation on (the rotation period is configurable).
  • Use encryption context and kms:ViaService conditions to bind usage to the expected service.
  • Alert on DisableKey and ScheduleKeyDeletion events.
All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Cloud Security Posture