Skip to content

aws-cdk-lib/aws-cognito: Add LambdaVersion V3_0 enum #33733

@enpatrik

Description

@enpatrik

Describe the feature

Add the new enum value LambdaVersion V3_0 for PreTokenGenerationConfig.

CloudFormation allowed values: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-pretokengenerationconfig.html#cfn-cognito-userpool-pretokengenerationconfig-lambdaversion

CDK Enum: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-cognito/lib/user-pool.ts#L301

Use Case

I would like to be able to use CDK's addTrigger function for adding a PRE_TOKEN_GENERATION_CONFIG with the new version 3.0.

Example:

userPool.addTrigger(cognito.UserPoolOperation.PRE_TOKEN_GENERATION_CONFIG, lambdaFunc, cognito.LambdaVersion.V3_0)

Proposed Solution

No response

Other Information

To be used for the new M2M pre token customization flow, see AWS announcement: https://aws.amazon.com/about-aws/whats-new/2025/03/amazon-cognito-access-token-m2m-authorization-flows/

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

v2.182.0

Environment details (OS name and version, etc.)

Typescript

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-cognitoRelated to Amazon Cognitoeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions