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
Duplicate Cognito User pool create when resource and function defined with same name #5282
Comments
Having the same issue. Curious when a resolution may be reached? |
I'm also having this problem and can't get to solve it by following the examples in the docs or other closed issues |
@Ccastillo06 I was able to correct the issue by doing so... (bolded parts are the important piece. This did work for me even after I was experiencing all the issues. CognitoUserPoolMyUserPool: postConfirmation: |
Your solution worked like a charm @robotlemons !! 🎉 Thank you very much for sharing it! The part that was really confusing for me was that the docs call the
I thought that this way I was setting the same name for both, but the key here is to give the So I finally just declared my user pool in
And in
Hope this helps someone else in the future! Big thanks again for your help! 💯 |
@Ccastillo06 So in teh PostConfirmation declaration, in the cognitoUserPool events section. What should be the value for 'pool'? I've tried the actual name of the user pool and it keeps creating new user pools. I've also tried the value directly under 'Resources' (in your case 'CognitoUserPoolMyUserPool'). Now in your 'pool' value you said you input 'MyUserPool' without the CognitoUserPool part, but my resource name is different. So what should my name be? I've tried the full name and that doesn't work. |
This example, you would use whatever is after CognitoUserPool as your pool value. In this case, it would be MyUserPool |
@robotlemons Thanks for the prompt response! So I should rename my resource. Currently I don't have it starting with CognitoUserPool. Currently it's just called: MycompanyUserPool. I'll change it to: CognitoUserPoolMyCompanyUserPool... Is that correct? |
Yes
…Sent from my iPhone
On Apr 11, 2019, at 12:33 PM, Studio2133 ***@***.***> wrote:
@robotlemons Thanks for the prompt response!
So I should rename my resource. Currently I don't have it starting with CognitoUserPool. Currently it's just called: MycompanyUserPool. I'll change it to: CognitoUserPoolMyCompanyUserPool... Is that correct?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@Studio2133 In your case you should do what @robotlemons said, just add So in the end you should have: So your user pool definition in
And then the lambda trigger definition in
I've had this working fine for us in our latest project (calling other lambdas and services from AWS using the Remember to remove every duplicated pool before you create the fixed pools so there's nothing confusing in the AWS control panel. Hope this is useful and solves the issue! |
@Studio2133 More details on this approach can be found in this article. |
This is a (Bug Report )
Description
For bug reports:
cognito-user-pool.yml
serverless.yml
It end up with created two UserPools with same name and one with attached trigger function, other with attached policies and other things that i define in cognito-user-pool
Similar or dependent issues:
Additional Data
"serverless": "1.30.3"
The text was updated successfully, but these errors were encountered: