π‘οΈ AWS SageMaker Notebook Instance is not in a VPCπ’
- Contextual name: π‘οΈ Notebook Instance is not in a VPCπ’
- ID:
/ce/ca/aws/sagemaker/notebook-instance-in-vpc - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
Descriptionβ
Descriptionβ
This policy identifies AWS SageMaker Notebook Instances that are not deployed within a Virtual Private Cloud (VPC).
Rationaleβ
By default, SageMaker notebook instances run in an AWS-managed network environment with direct access to the public internet. Deploying notebook instances within a customer-managed VPC provides enhanced security, control, and visibility over network traffic.
Key benefits include:
- Network Isolation: The notebook instance can communicate with other AWS resources (such as Amazon RDS or EMR) using private IP addresses.
- Access Control: Inbound and outbound traffic can be tightly controlled using Security Groups and Network ACLs.
- Private Connectivity: AWS services (for example, Amazon S3) can be accessed through VPC Endpoints, ensuring traffic remains within the AWS global network.
- Monitoring and Auditing: Network activity can be monitored and analyzed using VPC Flow Logs.
Impactβ
Remediation requires provisioning a new SageMaker notebook instance within the desired VPC and subnet, as the VPC configuration cannot be modified after the notebook instance is created. This process may involve migrating data, notebooks, and configurations from the existing instance to the newly created one.
... see more
Remediationβ
Remediationβ
Deploy SageMaker Notebook Instances Within a VPCβ
To remediate this finding, provision a new AWS SageMaker Notebook Instance within the appropriate VPC and subnet, and migrate all required data and configurations from the existing incompliant instance. AWS does not allow the VPC configuration of a notebook instance to be modified after creation.
From Command Lineβ
1. Create a New Notebook Instance in the Desired VPCβ
Before proceeding, ensure that the target VPC, subnet, and security groups are properly configured.
aws sagemaker create-notebook-instance \
--notebook-instance-name {{new-instance-name}} \
--instance-type {{instance-type}} \
--role-arn {{iam-role-arn}} \
--subnet-id {{subnet-id}} \
--security-group-ids {{security-group-ids}} \
--direct-internet-access Disabled2. Migrate Data and Decommission the Incompliant Instanceβ
- Wait until the new notebook instance reaches the
InServicestate.- Migrate notebooks, datasets, and any required configurations from the existing instance to the newly created instance.
... see more