Amazon SageMaker notebook instances with direct internet access enabled create potential security vulnerabilities by allowing unauthorized outbound connections and possible data exfiltration channels. When enabled, malicious code or compromised notebooks can directly communicate with external servers, bypassing network security controls and potentially leaking sensitive information or intellectual property. To secure SageMaker notebook instances, you should explicitly disable direct internet access as shown in the following example:
resource"aws_sagemaker_notebook_instance""good_example"{name="example-notebook"role_arn="arn:aws:iam::123456789012:role/SageMakerRole"direct_internet_access="Disabled" # ✅ Direct internet access is correctly disabled
instance_type="ml.t2.medium"}
Non-Compliant Code Examples
resource"aws_sagemaker_notebook_instance""bad_example"{name="example-notebook"role_arn="arn:aws:iam::123456789012:role/SageMakerRole"direct_internet_access="Enabled" # ❌ Direct internet access should be disabled
instance_type="ml.t2.medium"}
1
2
rulesets:- Terraform / AWS # Rules to enforce / AWS.
맞춤형 데모 요청
Datadog 시작하기
Ask AI
AI-generated responses may be inaccurate. Verify important info.