CognitoUserPool customEmailSender trigger does not work
digitaltoad opened this issue · comments
The customEmailSender and customSmsSender triggers for a CognitoUserPool require slightly different configurations from the other triggers and fails to deploy. I've only been able to get them to work by using a transform on the userpool and supplying the required configuration. I would be happy to submit a PR for this but I'm not sure how to handle KMS at the moment in a nice way.
const kms = new aws.kms.Key('KMS');
const customEmailSenderFunction = new sst.aws.Function('CustomEmailSender', {
handler: 'customEmailSender.handler',
});
const userPool = new sst.aws.CognitoUserPool('UserPool', {
transform: {
userPool: {
lambdaConfig: {
kmsKeyId: kms.arn,
customEmailSender: {
lambdaArn: customEmailSenderFunction.arn,
lambdaVersion: 'V1_0'
}
}
}
}
});