使用Boto3从AWS Cognito检索数据 [英] Retrieve data from AWS Cognito using Boto3
问题描述
我正在使用 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屋!