Week3 assignment - create workteam error

run cell to check if work team exists, no output implying it does not yet exist.
then run the cell to create workteam and receive this error:

ClientError: An error occurred (ValidationException) when calling the CreateWorkteam operation: You are creating another work team. Try your request again later.

All previous cells run fine without error.

here is the instructions and code the for create workteam:
Instructions : Pass the Amazon Cognito user pool ID, client ID, and group name into the Cognito member definition of the function sm.create_workteam .
workteam_name = ‘groundtruth-workteam-{}’.format(timestamp)

if not check_workteam_existence(workteam_name):
create_workteam_response = sm.create_workteam(
Description=‘groundtruth workteam’,
# objects that identify the workers that make up the work team
‘CognitoMemberDefinition’: {
### BEGIN SOLUTION - DO NOT delete this comment for grading purposes
‘UserPool’: ‘us-east-1_9u8YzCzwb’, # Replace None
‘ClientId’: client_id, # Replace None
‘UserGroup’: user_pool_group_name # Replace None
### END SOLUTION - DO NOT delete this comment for grading purposes
print(“Workteam {} already exists”.format(workteam_name))

resolved. thank you.

1 Like