Control: 1 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.
Audit logs track and monitor system activities. They provide a record of events that can help you detect security breaches, investigate incidents, and comply with regulations. Audit logs also enhance the overall accountability and transparency of your organization.
Remediation
For information about configuring logging for AWS DataSync tasks, see Monitoring data transfers with Amazon CloudWatch Logs in the AWS DataSync User Guide.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.foundational_security_datasync_1Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.foundational_security_datasync_1 --shareSQL
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_idfrom  aws_datasync_task;