Derives a SageMaker UserProfile name from a user ID by replacing
non-word characters with hyphens.
This is the canonical derivation used by both SageMaker Studio Domain
and DataScience Team constructs. Changing this logic will break
space ownership associations.
Parameters
userid: string
The user identifier (e.g., SSO user ID or IAM username)
Returns string
A sanitized string suitable for SageMaker UserProfile names
Derives a SageMaker UserProfile name from a user ID by replacing non-word characters with hyphens.
This is the canonical derivation used by both SageMaker Studio Domain and DataScience Team constructs. Changing this logic will break space ownership associations.