AwsCLI icon
If icon
SlackIncomingWebhook icon
Schedule icon

AWS KMS Customer Managed Key (CMK) Automatic Rotation Drift Sentinel

Audits AWS Key Management Service (KMS) Customer Managed Keys for disabled automatic annual key rotation.

Categories
CloudInfrastructure

How it works

This workflow uses the Kestra AWS CLI plugin to iterate through all Customer Managed symmetric encryption keys (aws kms list-keys) and query their automatic rotation status (aws kms get-key-rotation-status). Industry security standards (such as PCI-DSS requirement 3.6, SOC 2, and HIPAA) mandate that cryptographic keys used to encrypt sensitive customer data must rotate annually. When automatic rotation is disabled, the same backing key material encrypts data indefinitely, increasing exposure windows. This workflow audits key rotation settings and escalates compliance drift to cloud security teams.

What you get

  • Automated compliance auditing of AWS KMS encryption keys.
  • Prevents compliance audit failures against SOC 2 and PCI-DSS standards.
  • Quantitative metrics on keys with disabled automatic rotation.

Who it's for

  • Cloud Security Engineers and Compliance Officers.
  • AWS Infrastructure Architects enforcing cryptographic governance.

Why orchestrate this with Kestra

  • Continuous Compliance Assurance: Automatically audits encryption posture weekly.
  • Native AWS CLI Automation: Executes genuine AWS CLI commands via scoped IAM credentials.
  • Direct Team Alerts: Delivers compliance reports directly to security operations channels.

Prerequisites

  • AWS IAM User or Role with kms:ListKeys and kms:GetKeyRotationStatus permissions.
  • Secrets AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and SLACK_WEBHOOK configured in Kestra.

Quick start

  1. Import the blueprint.
  2. Input target AWS region.
  3. Run the workflow to inspect KMS key rotation compliance.

How to extend

  • Automatically remediate non-compliant keys using aws kms enable-key-rotation --key-id <key>.
  • Expand audit to cover all active AWS regions dynamically.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.