Control: Aurora MySQL DB clusters should have audit logging enabled
Description
This control checks whether an Amazon Aurora MySQL DB cluster has audit logging enabled. The control fails if an Aurora MySQL DB cluster doesn't have audit logging enabled.
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 loginpowerpipe 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_idfrom aws_rds_db_cluster;