Properties validation failed for resource CognitoUserPoolClient

0

I'm trying to deploy configuration for Cognito user pool client and get always one error regarding CallBackURLs property.

My payload:

`"CognitoUserPoolClient": { "Type": "AWS::Cognito::UserPoolClient",

    "Properties": {
      "ClientName": "admin-ui",
      "ExplicitAuthFlows": [
        "ALLOW_ADMIN_USER_PASSWORD_AUTH",
        "ALLOW_CUSTOM_AUTH",
        "ALLOW_REFRESH_TOKEN_AUTH",
        "ALLOW_USER_SRP_AUTH"
      ],
      "PreventUserExistenceErrors": "LEGACY",
      "GenerateSecret": false,
      "UserPoolId": {
        "Ref": "CognitoUserPool"
      },
      "AllowedOAuthFlowsUserPoolClient": true,
      "AllowedOAuthScopes": [
        "phone",
        "email",
        "openid",
        "profile",
        "aws.cognito.signin.user.admin"
      ],
      "AllowedOAuthFlows": [
        "code",
        "implicit"
      ],
      "CallBackURLs": [
        "https://example.com"
      ],
      "SupportedIdentityProviders": [
        "COGNITO"
      ]
    }
  } `

Error: CREATE_FAILED: CognitoUserPoolClient (AWS::Cognito::UserPoolClient) Properties validation failed for resource CognitoUserPoolClient with message: #: extraneous key [CallBackURLs] is not permitted

maybe anyone faced such case and know how it can be rwsolved ?

Victor
asked 3 months ago182 views
2 Answers
0

Hello,

Short Description

The validation error is caused because the expected property in the AWS::Cognito::UserPoolClient resource type is CallbackURLs (lower case b) and not CallBackURLs (upper case B). Please see this doc [1] for more information on the right syntax.

CloudForamtion resource properties are case sensitive in nature.

Fix

Replace CallBackURLs with CallbackURLs and properties validation error will go away.

Reference

[1] AWS::Cognito::UserPoolClient CallbackURLs Property - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-callbackurls

[2] AWS::Cognito::UserPoolClient - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html

AWS
answered 3 months ago
0

Hi,

According to the AWS documentation, CloudFormation Parameters are separated with a space and the key names are case sensitive. Could you try agains using CallbackURLs instead of CallBackURLs as defined on AWS::Cognito::UserPoolClient properties?

I hope this helps you.

profile picture
EXPERT
answered 3 months ago

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