turbot/steampipe-mod-aws-compliance

Control: Amazon Connect instances should have CloudWatch logging enabled

Description

This control checks whether an Amazon Connect instance is configured to generate and store flow logs in an Amazon CloudWatch log group. The control fails if the Amazon Connect instance isn't configured to generate and store flow logs in a CloudWatch log group.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.connect_instance_logging_enabled

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

with contactflow_logs_attribute as (
select
concat('arn:', a.partition, ':connect:', a.region, ':', a.account_id, ':instance/', a.instance_id) as instance_id
from
aws_connect_instance as i
left join aws_connect_instance_attribute as a on i.arn = concat('arn:', a.partition, ':connect:', a.region, ':', a.account_id, ':instance/', a.instance_id)
where
attribute_type = 'CONTACTFLOW_LOGS'
and value = 'true'
)
select
arn as resource,
case
when a.instance_id is not null then 'ok'
else 'alarm'
end as status,
case
when a.instance_id is not null then title || ' logging enabled.'
else title || ' logging disabled.'
end as reason
, region, account_id
from
aws_connect_instance as i
left join contactflow_logs_attribute as a on a.instance_id = i.arn;

Tags