Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(aws-cognito): L2 Construct support for analytics configuration #32837

Closed
1 of 2 tasks
wladyslawczyzewski opened this issue Jan 10, 2025 · 6 comments · Fixed by #32862
Closed
1 of 2 tasks

(aws-cognito): L2 Construct support for analytics configuration #32837

wladyslawczyzewski opened this issue Jan 10, 2025 · 6 comments · Fixed by #32862
Labels
@aws-cdk/aws-cognito Related to Amazon Cognito effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. open-for-community-contribution We are welcoming community contributions for this one p3

Comments

@wladyslawczyzewski
Copy link
Contributor

Describe the feature

At this moment, to configure native integration of Cognito's App Client with the Pinpoint project you can either do this from the AWS Console or use the workaround like showed below.

CDK already has the L2 construct for Cognito App Client and we need to extend this construct to allow engineers to configure the integration from the L2 construct props instead of L1 construct.

    (
      client.node.defaultChild as cognito.CfnUserPoolClient
    ).analyticsConfiguration = {
      userDataShared: true,
      applicationArn: props.analyticsAppArn,
    };

Use Case

Cognito has the native integration with Pinpoint analytics useful for operations like InitiateAuth, RespondToAuthChallenge and few others. This integration allows Cognito App Client to send the analytic events to Pinpoint without implementing this separately.

Proposed Solution

No response

Other Information

No response

Acknowledgements

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

CDK version used

2.173.2

Environment details (OS name and version, etc.)

macOS, Node v22

@wladyslawczyzewski wladyslawczyzewski added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 10, 2025
@github-actions github-actions bot added the @aws-cdk/aws-cognito Related to Amazon Cognito label Jan 10, 2025
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 and removed needs-triage This issue or PR still needs to be triaged. labels Jan 10, 2025
@khushail khushail self-assigned this Jan 10, 2025
@khushail
Copy link
Contributor

Hi @wladyslawczyzewski , thanks for opening this feature request. Yes, this is currently no available in L2 construct UserPoolClientProps -

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPoolClientProps.html

Here is L1 constuct pointing to User pool client for analytics configuration -

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnUserPoolClient.html#analyticsconfiguration

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-analyticsconfiguration

An L2 support would be great. Thanks for volunteering for contribution. Looking forward to your PR!

@khushail khushail added p3 open-for-community-contribution We are welcoming community contributions for this one effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 labels Jan 10, 2025
@khushail khushail removed their assignment Jan 10, 2025
@khushail khushail changed the title (aws-cognito): Unable to configure the analytics with L2 constructs (aws-cognito): L2 Construct support for analytics configuration Jan 10, 2025
@wladyslawczyzewski
Copy link
Contributor Author

oops, looks like we both were working on this issue @ren-yamanashi :) thanks for you contribution! closing my PR in that case.

@ren-yamanashi
Copy link
Contributor

ren-yamanashi commented Jan 12, 2025

oops, looks like we both were working on this issue @ren-yamanashi :) thanks for you contribution! closing my PR in that case.

@wladyslawczyzewski

I apologize for neglecting to confirm that you are allowed to submit a PR.
Also, thank you for leaving my PR 🙏

@wladyslawczyzewski
Copy link
Contributor Author

@ren-yamanashi thank you for your work on this! hopefully someone from maintainers team will merge it soon :)

Copy link

github-actions bot commented Feb 7, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

1 similar comment
Copy link

github-actions bot commented Feb 7, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-cognito Related to Amazon Cognito effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. open-for-community-contribution We are welcoming community contributions for this one p3
Projects
None yet
3 participants