使用Boto3从AWS Cognito检索数据 [英] Retrieve data from AWS Cognito using Boto3

查看:99
本文介绍了使用Boto3从AWS Cognito检索数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 AWS Cognito 对用户进行身份验证,已成功存储用户名,姓氏,地址等用户详细信息。但是无法找到任何相关方法来检索存储的数据在Cognito中使用 Boto3

I am using AWS Cognito to authenticate user, been successfully in storing user details like username, lastname, address etc. But unable to find any relevant methods to retrieve data stored in Cognito using Boto3.

是否可以检索用户 AWS Cognito中的数据还是应该将它们存储在RDS中?

Is it possible to retrieve user data in AWS Cognito or I should store them in RDS?

推荐答案

是的,您可以使用 get_user 方法。

Yes, you can do this by using the get_user method.



  • UserAttributes list )-代表用户属性的名称/值对数组。

  • UserAttributes (list) -- An array of name-value pairs representing user attributes.

对于自定义属性,您必须在 custom:
属性名称的前缀。

For custom attributes, you must prepend the custom: prefix to the attribute name.


  • dict )-指定是否他的属性是标准属性还是自定义属性。

  • (dict) -- Specifies whether the attribute is standard or custom.


  • 名称字符串) -属性的名称。

  • Name (string) -- The name of the attribute.

string )-属性。

这篇关于使用Boto3从AWS Cognito检索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆