Control: SageMaker notebook instances should not have direct internet access
Description
Manage access to resources in the AWS Cloud by ensuring that Amazon SageMaker notebooks do not allow direct internet access.
Usage
Run the control in your terminal:
powerpipe control run terraform_aws_compliance.control.sagemaker_notebook_instance_direct_internet_access_disabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_aws_compliance.control.sagemaker_notebook_instance_direct_internet_access_disabled --share
SQL
This control uses a named query:
select address as resource, case when (attributes_std -> 'direct_internet_access') is null or (attributes_std ->> 'direct_internet_access') = 'Disabled' then 'ok' else 'alarm' end as status, split_part(address, '.', 2) || case when trim(attributes_std ->> 'direct_internet_access') = '' then ' ''direct_internet_access'' is not defined' when (attributes_std -> 'direct_internet_access') is null or (attributes_std ->> 'direct_internet_access') = 'Disabled' then ' direct internet access disabled' else ' direct internet access enabled' end || '.' reason , path || ':' || start_linefrom terraform_resourcewhere type = 'aws_sagemaker_notebook_instance';