Cognito triggers with multiple stages

Hi!

We have split our resources into one repo and the API to another as suggested under “best practises”.

We are using only a dev and prod stage for resources, but multiple feature branches in the API that all talk to the dev resources.

When trying to write cognito triggers in serverless we get a problem where there of course only can be one trigger per trigger type in the cognito pool. So when we start using feature branches it breaks.

Do you have any suggestions on how to handle this?

We thought about writing the tigger functions in the resources stack, but then we won’t be able to use all the libraries we have written.

All the best!