You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cognito): user pool: adds custom sender (Email/SMS) lambda triggers (#17740)
### Motivation
I would like to use the Custom Sender triggers in my CDK app. They are supported by raw CF (despite the docs claiming otherwise).
I do not wish to use the CfnUserPool construct as I am unable to pass the pool as a reference to other constructs (e.g. API Gateway authorisers/User Pool App Clients/etc.).
I do not wish to follow the method recommended by the docs either (using the CLI to update the pool post-deployment), as it is hard to automate (requiring me to fetch the ARNs of my functions and KMS Key, not to mention it overrides other properties of the User Pool), and leaks my stack configuration out from CDK and into some post-deploy script.
Please find this PR in support of adding the triggers to CDK.
### Description
Adds support for 2 extra lambda triggers (`CustomEmailSender` and `CustomSMSSender`). These triggers have a different format, requiring both function ARN and version (only supported value is `V1_0`).
Additionally, specifying either of these requires a `KMSKeyId` be specified as well, which appears as a property of the `LambdaTriggers` property in CF.
Additionally, specifying the `CustomSMSSender` requires the `smsRole` be specified (allowing `sns:publish`).
Neither of these requirements are enforced in the code, but CF will throw helpful (IMO) errors if they are not satisfied.
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
0 commit comments