You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found this out the hard way - after spending a couple of hours I eventually use Jackson to convert the input CognitoUserPoolPreTokenGenerationEventV2 object to a Map and manually set the List for response group override. Please update the Java objects for CognitoUserPoolPreTokenGenerationEventV2.GroupOverrideDetails as they should be Lists, not Maps.
According to my support representative and the documentation https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html#aws-lambda-triggers-pre-token-generation-example-version-2-overview, the response should return list types for groupsToOverride and iamRolesToOverride even when I use V2 pre token generation, not Map<String, String>. My experiences with Map<String, String> here is that cognito fails when I return an object generated by the current java sdk with map here instead of a list, so I suspect that the SDK uses the wrong types here. Thank you in advance for looking into my issue!
The text was updated successfully, but these errors were encountered: