turbot/steampipe-mod-aws-compliance

Control: SageMaker endpoint production variants should have an initial instance count greater than 1

Description

This control checks whether production variants of an Amazon SageMaker AI endpoint have an initial instance count greater than 1. The control fails if the endpoint's production variants have only 1 initial instance.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.sagemaker_endpoint_configuration_prod_instance_count_greater_than_one

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

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;

Tags