aws workspace: getting "The specified user could not be found in the directory" when trying to create workspace

138 Views Asked by At

When I run the aws workspaces create-workspaces command from cli I get the

I am trying the below

    client = boto3.Session(region_name="us-east-1").client('workspaces')
    response = client.create_workspaces(
        Workspaces=[
            {
                'DirectoryId': 'd-xxxxxxxxxx',
                'UserName': 'Santhoshtest',
                'BundleId': 'wsb-sssssssssss',
                'WorkspaceProperties': {
                    'RunningMode': 'AUTO_STOP'
                }
            },
        ]
    )

I am getting the following error

'ErrorCode': 'ResourceNotFound.User', 'ErrorMessage': 'The specified user could not be found in the directory.'}],

How to add a user to the Directory using boto3

0

There are 0 best solutions below