After I login into a SageMaker Studio with a specific user profile, how can I find out which user profile I am logged in with? I know I can easily figure out which execution role I am using, but I wan to know which User Profile I am using. Is it even possible?
Question posted in Amazon Web Sevices
The official Amazon Web Services documentation can be found here.
The official Amazon Web Services documentation can be found here.
3
Answers
It is possibile using boto3 describe_user_profile().
and this is the full response:
Top right-hand corner, to the right of the notification and profile icons. Whatever is between the profile icon and the
/
will match up to the user profile you logged in with.And if you want to get more information about that user profile, you can go to File > New > Terminal, and type
aws sagemaker describe-user-profile --domain-id <domain-id> --user-profile-name <profile>
. The domain id is in your URL, betweenhttps://
and.studio.<region>.sagemaker.aws
.You can try to read
/opt/ml/metadata/resource-metadata.json
.{"AppType":"KernelGateway","DomainId":"d-...","UserProfileName":"...","ResourceArn":"...","ResourceName":"...","AppImageVersion":""}