turbot/steampipe-mod-aws-compliance

Control: Aurora MySQL DB clusters should publish audit logs to CloudWatch Logs

Description

This control checks whether an Amazon Aurora MySQL DB cluster is configured to publish audit logs to Amazon CloudWatch Logs. The control fails if the cluster isn't configured to publish audit logs to CloudWatch Logs.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.rds_db_cluster_aurora_mysql_audit_logging_enabled

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
arn as resource,
case
when engine not ilike '%aurora-mysql%' then 'skip'
when enabled_cloudwatch_logs_exports @> '["audit"]' then 'ok'
else 'alarm'
end as status,
case
when engine not ilike '%aurora-mysql%' then title || ' is not Aurora MySQL-compatible edition.'
when enabled_cloudwatch_logs_exports @> '["audit"]' then title || ' audit logging enabled.'
else title || ' audit logging disabled.'
end as reason
, region, account_id
from
aws_rds_db_cluster;

Tags