in sagemaker_studio_image_build/codebuild.py [0:0]
def _get_studio_metadata(self):
metadata_file_path = "/opt/ml/metadata/resource-metadata.json"
if not os.path.exists(metadata_file_path):
return None, None
with open(metadata_file_path) as f:
metadata = json.load(f)
return metadata.get("DomainId"), metadata.get("UserProfileName")