Skip to content

feat(cognito): specifying the trigger event version in UserPool.addTrigger()#28899

Merged
mergify[bot] merged 15 commits intoaws:mainfrom
badmintoncryer:28683-preTokenGeneration
Feb 2, 2024
Merged

feat(cognito): specifying the trigger event version in UserPool.addTrigger()#28899
mergify[bot] merged 15 commits intoaws:mainfrom
badmintoncryer:28683-preTokenGeneration

Conversation

@badmintoncryer
Copy link
Copy Markdown
Contributor

@badmintoncryer badmintoncryer commented Jan 27, 2024

I have added a lambdaVersion to the UserPool.addTrigger().
This is in response to the support for V2.0 trigger event in preTokenGeneration.

declare const userpool: cognito.UserPool;
declare const preTokenGenerationFn: lambda.Function;

userpool.addTrigger(cognito.UserPoolOperation.PRE_TOKEN_GENERATION_CONFIG, preTokenGenerationFn, LambdaVersion.V2_0);

In #28683, apart from the current implementation approach, there was also a proposal to add lambdaVersion to UserPoolProps.lambdaTrigger. However, it was not adopted as it would result in a breaking change.

Closes #28683


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added admired-contributor [Pilot] contributed between 13-24 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 labels Jan 27, 2024
@badmintoncryer badmintoncryer changed the title feat(cognito): pre token generation lambda trigger feat(cognito): specifying the trigger event version in UserPool.addTrigger() Jan 27, 2024
@badmintoncryer badmintoncryer force-pushed the 28683-preTokenGeneration branch from f5e7250 to a0db50a Compare January 29, 2024 16:34
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jan 30, 2024
Copy link
Copy Markdown
Contributor

@aaythapa aaythapa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! Overall looks great, just some nitpicks

badmintoncryer and others added 6 commits February 1, 2024 11:38
Co-authored-by: Aayush thapa <84202325+aaythapa@users.noreply.github.com>
Co-authored-by: Aayush thapa <84202325+aaythapa@users.noreply.github.com>
Co-authored-by: Aayush thapa <84202325+aaythapa@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@aaythapa aaythapa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 2, 2024
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 3f0403e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Feb 2, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 7f2d4f1 into aws:main Feb 2, 2024
SankyRed pushed a commit that referenced this pull request Feb 8, 2024
…igger() (#28899)

I have added a `lambdaVersion` to the `UserPool.addTrigger()`. 
This is in response to the [support for V2.0 trigger event in preTokenGeneration](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html).

```ts
declare const userpool: cognito.UserPool;
declare const preTokenGenerationFn: lambda.Function;

userpool.addTrigger(cognito.UserPoolOperation.PRE_TOKEN_GENERATION_CONFIG, preTokenGenerationFn, LambdaVersion.V2_0);
```

In #28683, apart from the current implementation approach, there was also a proposal to add `lambdaVersion` to `UserPoolProps.lambdaTrigger`. However, it was not adopted as it would result in a breaking change.

Closes #28683

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TheRealAmazonKendra pushed a commit that referenced this pull request Feb 9, 2024
…igger() (#28899)

I have added a `lambdaVersion` to the `UserPool.addTrigger()`. 
This is in response to the [support for V2.0 trigger event in preTokenGeneration](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html).

```ts
declare const userpool: cognito.UserPool;
declare const preTokenGenerationFn: lambda.Function;

userpool.addTrigger(cognito.UserPoolOperation.PRE_TOKEN_GENERATION_CONFIG, preTokenGenerationFn, LambdaVersion.V2_0);
```

In #28683, apart from the current implementation approach, there was also a proposal to add `lambdaVersion` to `UserPoolProps.lambdaTrigger`. However, it was not adopted as it would result in a breaking change.

Closes #28683

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@badmintoncryer badmintoncryer deleted the 28683-preTokenGeneration branch February 13, 2024 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

admired-contributor [Pilot] contributed between 13-24 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aws_cognito: lambd trigger version

3 participants