Control: RDS for SQL Server DB instances should publish logs to CloudWatch Logs
Description
This control checks whether an Amazon RDS for Microsoft SQL Server DB instance is configured to publish logs to Amazon CloudWatch Logs. The control fails if the RDS for SQL Server DB instance isn't configured to publish logs to CloudWatch Logs. You can optionally specify the types of logs that a DB instance should be configured to publish.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.rds_db_instance_sql_server_logging_enabledSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.rds_db_instance_sql_server_logging_enabled --shareSQL
This control uses a named query:
select  arn as resource,  case    when not engine like 'sqlserver%' then 'skip'    when enabled_cloudwatch_logs_exports ?& array ['error'] then 'ok'    else 'alarm'  end as status,  case    when not engine like 'sqlserver%' then title || ' is of ' || engine || ' type.'    when enabled_cloudwatch_logs_exports ?& array ['error'] then title || ' logging enabled.'    else title || ' logging disabled.'  end as reason    , region, account_idfrom  aws_rds_db_instance;