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

Cognito UserPool constructor incorrectly attaches lambdaConfig lambdas #4496

Open
samueltanner opened this issue Sep 20, 2024 · 1 comment
Open
Labels
kind/bug Some behavior is incorrect or out of spec needs-repro Needs repro steps before it can be triaged or fixed service/cognito

Comments

@samueltanner
Copy link

When I deploy changes to my cognito user pool, I will often find that my postConfirmation lambda and preTokenGeneration lambda will fail to invoke. I will get access denied exceptions despite having my execution role's trust relationships set correctly.

I have found that I have to go into the AWS console and re-attach the lambdas in order for them to function correctly.

I am running pulumi within a sst V3 instance

  const userPool = new aws.cognito.UserPool(`GGUserPool${$app.stage}`, {
    name: `GGUserPool${$app.stage}`,
    usernameAttributes: ["email"],
    autoVerifiedAttributes: ["email"],
    verificationMessageTemplate: {
      defaultEmailOption: "CONFIRM_WITH_CODE",
      emailMessage:
        "Hello, Thanks for signing up! Your verification code is {####}",
      emailSubject: "Verify your email!",
      smsMessage:
        "Hello, Thanks for signing up! Your verification code is {####}",
    },
    lambdaConfig: {
      postConfirmation: postConfirmationLambdaArn,
      preTokenGeneration: tokenLambdaArn,
    },
  })
@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Sep 20, 2024
@t0yv0 t0yv0 added service/cognito needs-repro Needs repro steps before it can be triaged or fixed and removed needs-triage Needs attention from the triage team labels Sep 23, 2024
@t0yv0
Copy link
Member

t0yv0 commented Sep 23, 2024

Could you please include a fully self-contained example that reproduces the issue? Much appreciated.

@mikhailshilkov mikhailshilkov added the kind/bug Some behavior is incorrect or out of spec label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec needs-repro Needs repro steps before it can be triaged or fixed service/cognito
Projects
None yet
Development

No branches or pull requests

4 participants