turbot/steampipe-mod-aws-compliance

Query: guardduty_detector_s3_protection_enabled

Usage

powerpipe query aws_compliance.query.guardduty_detector_s3_protection_enabled

Steampipe Tables

SQL

with s3_protection as (
select
arn
from
aws_guardduty_detector,
jsonb_array_elements(features) as f
where
f ->> 'Name' = 'S3_DATA_EVENTS'
and f ->> 'Status' = 'ENABLED'
)
select
d.arn as resource,
case
when m.arn is not null then 'ok'
else 'alarm'
end as status,
case
when m.arn is not null then title || ' has S3 protection enabled.'
else title || ' has S3 protection disabled.'
end as reason
, region, account_id
from
aws_guardduty_detector as d
left join s3_protection as m on m.arn = d.arn

Controls

The query is being used by the following controls: