how to create cognito GUID userpoolname on cloudformation

0

this is my code: Resources: rCognitoUserPool: Type: AWS::Cognito::UserPool Properties: UserPoolName: !Ref pUserPoolName AutoVerifiedAttributes: - email Policies: PasswordPolicy: MinimumLength: 8 RequireLowercase: true RequireNumbers: true RequireUppercase: true RequireSymbols: true Schema: - Name: sub DeveloperOnlyAttribute: false Mutable: false Required: true UserPoolAddOns: AdvancedSecurityMode: OFF AdminCreateUserConfig: AllowAdminCreateUserOnly: false AccountRecoverySetting: RecoveryMechanisms: - Name: verified_email Priority: 1 UsernameAttributes: - email

rUserPoolGSI: Type: AWS::Cognito::UserPoolUser Properties: UserPoolId: Ref: rCognitoUserPool Schema: - Name: sub DeveloperOnlyAttribute: false Mutable: false Required: true GlobalSecondaryIndexes: - IndexName: GUIDIndex Schema: - Name: sub Projection: ProjectionType: ALL

Then i get this error when i deploy the stack rCognitoUserPool UPDATE_FAILED Properties validation failed for resource rCognitoUserPool with message: #: extraneous key [GlobalSecondaryIndexes] is not permitted 2023-11-07 10:09:35 UTC+0200 rUserPoolGSI CREATE_FAILED Properties validation failed for resource rUserPoolGSI with message: #: extraneous key [GlobalSecondaryIndexes] is not permitted #: extraneous key [Schema] is not permitted

how can i achieve this?

I am trying to acrhieve this:

User name 3c24ffd5-0e39-4f4b-87b3-2b80b832227f 3fe79c10-3bfc-470b-8f5f-311fa26efba5 8dbf2195-f79b-4f87-a344-81d17afbfd70 b7cf847d-5096-4ca7-8cc0-bbd9684b09a8 c79efa3b-8b52-43f5-8ee1-155ab97b52c1 cd1e55f7-295e-403c-9463-c8285d0a42a9

  • I am trying to acrhieve this:

    User name 3c24ffd5-0e39-4f4b-87b3-2b80b832227f 3fe79c10-3bfc-470b-8f5f-311fa26efba5 8dbf2195-f79b-4f87-a344-81d17afbfd70 b7cf847d-5096-4ca7-8cc0-bbd9684b09a8 c79efa3b-8b52-43f5-8ee1-155ab97b52c1 cd1e55f7-295e-403c-9463-c8285d0a42a9

  • Resources: rCognitoUserPool: Type: AWS::Cognito::UserPool Properties: UserPoolName: !Ref pUserPoolName AutoVerifiedAttributes: - email Policies: PasswordPolicy: MinimumLength: 8 RequireLowercase: true RequireNumbers: true RequireUppercase: true RequireSymbols: true Schema: - Name: sub DeveloperOnlyAttribute: false Mutable: false Required: true UserPoolAddOns: AdvancedSecurityMode: OFF AdminCreateUserConfig: AllowAdminCreateUserOnly: false AccountRecoverySetting: RecoveryMechanisms: - Name: verified_email Priority: 1 UsernameAttributes: - email

    rUserPoolGSI: Type: AWS::Cognito::UserPoolUser Properties: UserPoolId: Ref: rCognitoUserPool Schema: - Name: sub DeveloperOnlyAttribute: false Mutable: false Required: true GlobalSecondaryIndexes: - IndexName: GUIDIndex Schema: - Name: sub Projection: ProjectionType: ALL

    rCognitoUserPoolClient: Type: AWS::Cognito::UserPoolClient Properties: ClientName: !Ref pUserPoolClientName UserPoolId: !Ref rCognitoUserPool ExplicitAuthFlows: - ALLOW_CUSTOM_AUTH - ALLOW_REFRESH_TOKEN_AUTH - ALLOW_USER_PASSWORD_AUTH - ALLOW_USER_SRP_AUTH

No Answers

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