in src/sagemaker_tensorflow_container/deep_learning_container.py [0:0]
def _validate_instance_id(instance_id):
"""
Validate instance ID
"""
compiled_regex = re.compile(r"^(i-\S{17})")
match = compiled_regex.match(instance_id)
if not match:
return None
return match.group(1)