Is the easiest way to add a cognito user to a group, automatically, on sign up to have a lambda trigger on “Post Authentication Trigger”? All users will be sent into a group called “Public”. Even though it seems dumb to add all users to a default group, I need that group to enable authentication strategies in other areas of AWS that require a cognito group to determine access levels. Can I specify a group in the Sign Up request instead?
I don’t think you can specify it, couldn’t find an option myself. I ended up using the post Auth hook for it. Make sure you check if the user is already in the group first, to not add it at every login
Sorry, “postConfirmation”. Got confused because I’m having one in “pre Auth” (another mistake there) as well because at the moment we use our old API in combination with cognito and if some role changes there I need it updated in cognito as well, until we move everything to cognito. That’s why I needed it checked and I mentioned it.