How to add a user to a user group by default in AWS CDK (Python)?

209 Views Asked by At

I am creating a AWS Cognito user pool using CDK called user_pool. I also created a user group like this:

cfn_user_pool_group_default = cognito.CfnUserPoolGroup(
            self, "DefaultGroup",
            user_pool_id=user_pool.user_pool_id,
            description="default group for all commons users",
            group_name="defaultGroup",
        )

My goal is to assign every new user to the user_pool by the time a user signs up. How can I configure this in AWS CDK?

I searched for something like "set_default_group" for user pools but found nothing.

0

There are 0 best solutions below