turbot/steampipe-mod-aws-compliance

Control: Step Functions state machines should have logging turned on

Description

This controls checks whether an AWS Step Functions state machine has logging turned on. The control fails if a state machine doesn't have logging turned on. If you provide a custom value for the logLevel parameter, the control passes only if the state machine has the specified logging level turned on.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.sfn_state_machine_logging_enabled

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
arn as resource,
case
when logging_configuration ->> 'Level' = 'OFF' then 'alarm'
else 'ok'
end as status,
case
when logging_configuration ->> 'Level' = 'OFF' then title || ' loggging disabled.'
else title || ' loggging enabled.'
end as reason
, region, account_id
from
aws_sfn_state_machine;

Tags