By using AWS re:Post, you agree to the Terms of Use
/Provision SSO user via Cloudformation AWS::SageMaker::UserProfile is not working/

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


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

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

1 Answers

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:

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

answered 3 months 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.

        Type: AWS::SageMaker::UserProfile
          DomainId: !Ref Domain
          SingleSignOnUserIdentifier: UserName
          UserProfileName: xxx-yyy-com
            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