turbot/steampipe-mod-aws-compliance

Query: sagemaker_endpoint_configuration_prod_instance_count_greater_than_one

Usage

powerpipe query aws_compliance.query.sagemaker_endpoint_configuration_prod_instance_count_greater_than_one

SQL

with prod_instance_count as (
select
distinct arn
from
aws_sagemaker_endpoint_configuration,
jsonb_array_elements(production_variants) as v
where
(v ->> 'InitialInstanceCount')::int = 1
)
select
c.arn as resource,
case
when p.arn is null then 'ok'
else 'alarm'
end as status,
case
when p.arn is null then title || ' prod instance count is greater than one.'
else title || ' prod instance count is not greater than one.'
end as reason
, region, account_id
from
aws_sagemaker_endpoint_configuration as c
left join prod_instance_count as p on p.arn = c.arn;

Controls

The query is being used by the following controls: