CDK Cognito Standard Attributes VS Console Cognito Standard Attributes

0

Hi, I found that from the console, you can specify "name" as a standard attribute (it is in the attributes list options) From CDK you can't. You can specify: fullname or familyname but not name.

cdk deploy error:

standardAttributes: {
        name: {
          mutable: true,
          required: true,
        }
}
1 Answer
0
Accepted Answer

Hello.

The same issue was reported in the GitHub issue below.
If you want to set "name", you must specify "fullname".
https://github.com/aws/aws-cdk/issues/17361

It seems that "name" is mapped to "fullname" in CDKv2.
https://github.com/aws/aws-cdk/blob/d2ea2809cd3024052b8cfa76a990cbc9e9224688/packages/aws-cdk-lib/aws-cognito/lib/private/attr-names.ts#L10

The document below also mentions "fullname".
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.StandardAttributes.html

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
Sandeep
reviewed a month ago