We are considering sending mail only to users who have specified attributes among users registered with awscognito.
The user pool was accessible and user information could not be retrieved, but the value specified for the custom attribute could not be retrieved.
response=client.list_users(
UserPoolId = USER_POOL_ID,
AttributesToGet=['email',
Limit = LIMIT
)
We are trying to decide whether or not to send an email based on the data of the custom attributes, so we are having trouble meeting the requirements.I'm thinking of using a user group instead of a custom attribute, but I don't know how to retrieve it in the same way. (I looked it up on the web, but I couldn't find it because I didn't get many references.)
If you know how to get custom attributes or user groups from lambda(python), please let me know.If you have information that you can't do it, that's fine.
Thank you for your cooperation.
If you want to check Cognito's API specifications, the API documentation is more helpful than the SDK documentation.
https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUsers.html
Questioning
Unable to retrieve the specified value for the custom attribute
For , you can either specify the corresponding custom attributes in AttributesToGet or remove the AttributesToGet designation itself.If not specified, all attributes are returned.With this API, you have to list the previous users, so I think it would be more efficient if you put the ListUsersInGroup API after putting the users in the group.
912 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.