我已经通过Terraform创建了一个AWS Cognito用户池,如下所示:
resource "aws_cognito_user_pool" "users-base" {
name = "users"
provider = aws.eu-west-1
auto_verified_attributes = ["email"]
username_attributes = ["email"]
account_recovery_setting {
recovery_mechanism {
name = "verified_email"
priority = 1
}
recovery_mechanism {
name = "verified_phone_number"
priority = 2
}
}
admin_create_user_config {
allow_admin_create_user_only = false
}
email_configuration {
email_sending_account = "DEVELOPER"
from_email_address = "No-reply <[email protected]>"
source_arn = aws_ses_email_identity.no-reply.arn
}
lambda_config {
custom_message = aws_lambda_function.cognito-users-base.arn
}
}
虽然我希望我的用户收到生成的邮件aws_lambda_function.cognito-users-base
(由于以前生成错误,所以配置正确,但他们仍然收到根据生成的邮件verification_message_template.email_message_by_link
,我想念什么?
编辑:我还检查了生成的smsMessage少于140个角色,而emailMessage少于20.000个。而且,当我添加属性时,SignUp进程将阻塞,因此lambda会以另一种方式被调用。
看来我的lambda正在生成没有{##Some text##}
它的身体,导致无声地丢弃了生成的身体。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句