turbot/steampipe-mod-aws-compliance

Control: CloudTrail trail logs should be encrypted with KMS CMK

Description

To help protect sensitive data at rest, ensure encryption is enabled for your AWS CloudWatch Log Groups.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.cloudtrail_trail_logs_encrypted_with_kms_cmk

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.cloudtrail_trail_logs_encrypted_with_kms_cmk --share

SQL

This control uses a named query:

select
arn as resource,
case
when kms_key_id is null then 'alarm'
else 'ok'
end as status,
case
when kms_key_id is null then title || ' logs are not encrypted at rest.'
else title || ' logs are encrypted at rest.'
end as reason
, region, account_id
from
aws_cloudtrail_trail
where
region = home_region;

Tags