Provision SSO user via Cloudformation AWS::SageMaker::UserProfile is not working

0

I have issue that when running a CloudFormation stack with AWS::SageMaker::UserProfile in it, it did create the user profile under sagemaker domain, but when I tried to login to the sagemaker with the specified user via SSO, it always got rejected and saying the user is not added to the domain.

While if I add the user manually with AWS Console GUI, it works. So I suspect it's an issue of CloudFormation with AWS::SageMaker::UserProfile resource.

And I also found this github issue https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/1128

Could someone help me confirm it? Or I misunderstand something?

1 Answer
1

The symptoms you are describing aligns to the github issue. Are you able to workaround this issue by manually associating the same User referenced via CloudFormation User Profile with the Domain. Ignore the error you will see when doing this action, but internally it will call AssociateProfile API. Also, can you confirm whether you are using domainID in the CloudFormation template:

UserProfile:
    Type: AWS::SageMaker::UserProfile
    Properties: 
      DomainId: !GetAtt StudioDomain.DomainId
      UserProfileName: !Ref UserProfileName
      UserSettings:
        ExecutionRole: !GetAtt SageMakerExecutionRole.Arn

profile pictureAWS
EXPERT
answered 2 years ago
  • I did use the domainId in my clouformation, here is the code snippet, but I'll also tried the workaround to see if it works.

      UserXXX:
        Type: AWS::SageMaker::UserProfile
        Properties:
          DomainId: !Ref Domain
          SingleSignOnUserIdentifier: UserName
          SingleSignOnUserValue: xxx@yyy.com
          UserProfileName: xxx-yyy-com
          UserSettings:
            ExecutionRole: !GetAtt DomainDefaultExecutionRole.Arn
    

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions