Skip to content

fix: CognitoUserPoolClientId AllowedPattern too strict (26 chars only, but AWS allows 1-128) #141

@takakuni-classmethod

Description

@takakuni-classmethod

Bug Description

The CognitoUserPoolClientId parameter in bedrock-auth-cognito-pool.yaml has an AllowedPattern that only allows exactly 26 characters:

AllowedPattern: '^[a-z0-9]{26}$'

However, the AWS documentation states that ClientId has:

Length Constraints: Minimum length of 1. Maximum length of 128.

This causes ccwb deploy to fail with a CloudFormation template validation error when the Cognito App Client ID is not exactly 26 characters (e.g., 25 characters).

Error Message

CloudFormation error: Template validation failed: Parameter CognitoUserPoolClientId failed to satisfy constraint: Must be a valid Cognito User Pool Client ID

Fix

Change the AllowedPattern to match the AWS documented constraints:

AllowedPattern: '^[a-z0-9]{1,128}$'

Affected File

deployment/infrastructure/bedrock-auth-cognito-pool.yaml line 22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions