[英]Not receiving user details on Cognito Post Confirmation Trigger
I have created user pool on cognito, I want to trigger a lambda function post the user is confirmed his identity.我在 cognito 上创建了用户池,我想在用户确认身份后触发 lambda function 帖子。 I am using Post Confirmation as trigger from my aws cognito user pool.我使用 Post Confirmation 作为来自我的 aws cognito 用户池的触发器。 What i observe is when the user is confirming is identity i am able to get the request in my lambda function.我观察到的是,当用户确认身份时,我能够在我的 lambda function 中获得请求。 But i am not getting any user details or user attributes in my lambda function request body comes as null.但我没有在我的 lambda function 请求正文中获得任何用户详细信息或用户属性,即 null。 Where as if i convert the same lambda to to a HTTP event and pass object from postman i am getting the request Body.好像我将相同的 lambda 转换为 HTTP 事件并从 Z03D476861AFD38451Z 传递 object 获取请求体Please help me to resolve this issue.请帮我解决这个问题。
Language used is Java使用的语言是 Java
we would need more details about how you are testing the confirmation flow + how your lambda is configured,我们需要更多关于您如何测试确认流程的详细信息 + 您的 lambda 是如何配置的,
in the meantime, I created a working example with Java 8 + Serverless Framework with Amazon Cognito in CloudFormation, you can see the details here:同时,我在 CloudFormation 中使用 Java 8 + 使用 Amazon Cognito 的无服务器框架创建了一个工作示例,您可以在此处查看详细信息:
https://github.com/oieduardorabelo/2021-03-19-cognito-java-post-signup-confirmation https://github.com/oieduardorabelo/2021-03-19-cognito-java-post-signup-confirmation
Pardon my Java, I know nothing about it!请原谅我的 Java,我对此一无所知!
I'm explaining how I tested the signup flow and the output in CloudWatch includes all necessary user details.我正在解释我是如何测试注册流程的,CloudWatch 中的 output 包含所有必要的用户详细信息。
I hope it can help you debug your application!我希望它可以帮助您调试您的应用程序!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.