Amazon SageMaker training job has inter-container traffic encryption enabled
Amazon SageMaker training jobs have inter-container traffic encryption configured for container-to-container communications during training.
The evaluation inspects the EnableInterContainerTrafficEncryption setting on training jobs.
Risk
Without inter-container encryption, in-node traffic may be plaintext, enabling capture by a compromised host or co-resident workload. This threatens confidentiality (training data, model parameters, credentials) and integrity (tampering with gradients/results), and can facilitate lateral movement via token or session theft.
Run this check with Prowler
Run in Prowler Cloudprowler aws --checks sagemaker_training_jobs_intercontainer_encryption_enabledRecommendation
Enable EnableInterContainerTrafficEncryption on all training jobs to enforce encryption in transit.
Apply defense in depth: combine with network isolation, limit roles and container privileges per least privilege, and standardize secure job templates or guardrails to prevent launching unencrypted jobs.
Remediation
Terraform
# Terraform: SageMaker Training Job with inter-container traffic encryption enabled
resource "aws_sagemaker_training_job" "job" {
name = "<example_resource_name>"
role_arn = "<example_resource_id>"
algorithm_specification {
training_image = "<example_resource_id>"
training_input_mode = "File"
}
output_data_config {
s3_output_path = "s3://<example_resource_name>/"
}
resource_config {
instance_count = 1
instance_type = "ml.m5.large"
volume_size_gb = 10
}
stopping_condition {
max_runtime_in_seconds = 3600
}
enable_inter_container_traffic_encryption = true # Critical: ensures inter-container traffic is encrypted
}NativeIaC
# CloudFormation: SageMaker Training Job with inter-container traffic encryption enabled
Resources:
SageMakerTrainingJob:
Type: AWS::SageMaker::TrainingJob
Properties:
TrainingJobName: <example_resource_name>
RoleArn: <example_resource_id>
AlgorithmSpecification:
TrainingImage: <example_resource_id>
TrainingInputMode: File
OutputDataConfig:
S3OutputPath: s3://<example_resource_name>/
ResourceConfig:
InstanceCount: 1
InstanceType: ml.m5.large
VolumeSizeInGB: 10
StoppingCondition:
MaxRuntimeInSeconds: 3600
EnableInterContainerTrafficEncryption: true # Critical: encrypts traffic between containers to pass the checkOther
Check Code
from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.sagemaker.sagemaker_client import sagemaker_client
class sagemaker_training_jobs_intercontainer_encryption_enabled(Check):
def execute(self):
findings = []
for training_job in sagemaker_client.sagemaker_training_jobs:
report = Check_Report_AWS(metadata=self.metadata(), resource=training_job)
report.status = "PASS"
report.status_extended = f"Sagemaker training job {training_job.name} has intercontainer encryption enabled."
if not training_job.container_traffic_encryption:
report.status = "FAIL"
report.status_extended = f"Sagemaker training job {training_job.name} has intercontainer encryption disabled."
findings.append(report)
return findings