AliasAttributes versus UsernameAttributes

The Cognito create user pool sub-command supports two properties that allow for additional properties, such as the username and email to be used for logging in. AliasAttributes defines the supported attributes to be used as an alias for this user pool. The possible values for AliasAttributes are the phone_number, email, or Preferred_username. UsernameAttributes defines the supported attributes that can be specified as usernames when a user signs up. The possible values for UsernameAttributes are the phone_number or email.

While the AliasAttributes property allows us to use additional attributes as aliases for our original username for login, the UsernameAttributes property allows us to use the specified attributes as usernames, instead of another username. We cannot specify both AliasAttributes and UsernameAttributes in a single configuration, or we will get an error (InvalidParameterException) stating that only one of the aliasAttributes or usernameAttributes can be set in a user pool.

The AliasAttributes or UsernameAttributes that we use has to be unique across our user pool.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.122.127