turbot/steampipe-mod-aws-compliance

Control: DataSync tasks should have logging enabled

Description

This control checks whether an AWS DataSync task has logging enabled. The control fails if the task doesn't have logging enabled.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.datasync_task_logging_enabled

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
arn as resource,
case
when cloud_watch_log_group_arn is not null and options ->> 'LogLevel' in ('BASIC', 'TRANSFER') then 'ok'
else 'alarm'
end as status,
case
when cloud_watch_log_group_arn is not null and options ->> 'LogLevel' in ('BASIC', 'TRANSFER') then title || ' ' || (options ->> 'LogLevel') || ' level logging enabled.'
else title || ' logging disabled.'
end as reason
, region, account_id
from
aws_datasync_task;

Tags