Control: KMS CMK rotation should be enabled
Description
Enable key rotation to ensure that keys are rotated once they have reached the end of their crypto period.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.kms_cmk_rotation_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.kms_cmk_rotation_enabled --share
SQL
This control uses a named query:
select arn as resource, case when origin = 'EXTERNAL' then 'skip' when key_state = 'PendingDeletion' then 'skip' when key_state = 'Disabled' then 'skip' when not key_rotation_enabled then 'alarm' else 'ok' end as status, case when origin = 'EXTERNAL' then title || ' has imported key material.' when key_state = 'PendingDeletion' then title || ' is pending deletion.' when key_state = 'Disabled' then title || ' is disabled.' when not key_rotation_enabled then title || ' key rotation disabled.' else title || ' key rotation enabled.' end as reason , region, account_idfrom aws_kms_keywhere key_manager = 'CUSTOMER';