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

Support existing UserPools #1821

Open
mousedownmike opened this issue Nov 20, 2020 · 2 comments
Open

Support existing UserPools #1821

mousedownmike opened this issue Nov 20, 2020 · 2 comments

Comments

@mousedownmike
Copy link

Description:
I would like to manage a Cognito custom messages Lambda function using SAM for an existing User Pool that is defined elsewhere (not in CloudFormation or SAM).

The current Cognito event source only accepts a UserPool reference "defined in the same template".

Would it be possible to add a UserPoolId that could be used in place of UserPool to address an existing pool and assign the SAM managed Lambda to that pool?

@JacekAdamczyk
Copy link

I stumbled upon this looking for an answer to my problem - is it really not supported?

@GavinZZ
Copy link
Contributor

GavinZZ commented Oct 25, 2023

This is currently not possible. In the current Cognito event source, Trigger is a required property and once set, it will update LambdaConfig property of the UserPool. If UserPool is in another template, there would be no way to update LambdaConfig property.

The only way is to allow not specifying Trigger property in SAM Function. However if that's the case, there is really no point to use Cognito event source anymore. You can just define a standalone AWS::Serverless::Function, AWS::Lambda::Permission, and a AWS::Cognito::UserPool resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants