# Problem while creating user pool

**URL:** <https://discourse.sst.dev/t/problem-while-creating-user-pool/1204>\
**Category:** Seed\
**Created:** [August 7, 2019, 2:06pm UTC](https://discourse.sst.dev/t/problem-while-creating-user-pool/1204 "2019-08-07T14:06:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![legolas](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/legolas/32/572_2.png) [@legolas](https://discourse.sst.dev/u/legolas)\
**Post date:** [August 7, 2019, 2:06pm UTC](https://discourse.sst.dev/t/problem-while-creating-user-pool/1204/1 "2019-08-07T14:06:23Z")

</div>

In the guide [here](https://serverless-stack.com/chapters/create-a-cognito-user-pool.html), as they suggest, we need to set **Username attributes** to email, but when I do it, I am not able to create my User Pool. Then, I keep getting this error.

> 1 validation error detected: Value '' at 'schema' failed to satisfy constraint: Member must have length greater than or equal to 1 (Service: AWSCognitoIdentityProviderService; Status Code: 400; Error Code: InvalidParameterException; Request ID: 2d84e736-e114-41b4-b730-7e35f5783832)

 ![Screenshot_20190807_170650](https://canada1.discourse-cdn.com/flex032/uploads/serverless_stack/original/1X/5cb19d9e8548b183e260d65aa0fcdc94ff16bceb.png)

If I leave it everything as a default, it creates the User pool

---

<div class="post-metadata">

**Author:** ![legolas](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/legolas/32/572_2.png) [@legolas](https://discourse.sst.dev/u/legolas)\
**Post date:** [August 7, 2019, 2:40pm UTC](https://discourse.sst.dev/t/problem-while-creating-user-pool/1204/2 "2019-08-07T14:40:47Z")

</div>

In order to fix the problem, We must set something to **Required attributes**. In this case, I set it as email, and now it works.

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [August 7, 2019, 6:03pm UTC](https://discourse.sst.dev/t/problem-while-creating-user-pool/1204/3 "2019-08-07T18:03:41Z")

</div>

Thanks for letting us know. Was it in this screen that you changed the required attribute?

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/serverless_stack/original/1X/2b4a84313d7047f3f53bac2b328a4728efd81f1f.png) [https://d33wubrfki0l68.cloudfront.net/b29f8be3f349426a19c455479d41696af788666e/08089/assets/cognito-user-pool/select-email-address-as-username.png](https://d33wubrfki0l68.cloudfront.net/b29f8be3f349426a19c455479d41696af788666e/08089/assets/cognito-user-pool/select-email-address-as-username.png)

---

<div class="post-metadata">

**Author:** ![legolas](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/legolas/32/572_2.png) [@legolas](https://discourse.sst.dev/u/legolas)\
**Post date:** [August 8, 2019, 6:46am UTC](https://discourse.sst.dev/t/problem-while-creating-user-pool/1204/4 "2019-08-08T06:46:01Z")

</div>

> [@jayair](#):
>
> Was it in this screen that you changed the required attribute?

Yes, It was in this screen. We have two option for this situation in order to fix it.

First option: We can choose the **Username** option, and leave it as a default. However, it did not let me to create test user because it throws error about **email** configuration in the console while I was trying to set it.

Second option: When we choose **Email address or phone number** option as the guide suggests, we must also choose **email** as a **required attribute** at the bottom of the page.

I added screenshot the way I configure

 ![Screenshot_20190808_094211](https://canada1.discourse-cdn.com/flex032/uploads/serverless_stack/original/1X/9707112bb5d91ff115562594cd46e5aa0a346262.png)

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [August 9, 2019, 7:51pm UTC](https://discourse.sst.dev/t/problem-while-creating-user-pool/1204/5 "2019-08-09T19:51:25Z")

</div>

Thanks! I’ll update the guide with this.

Edit: It’s weird I just tried going through the steps and I’m not seeing the error. I wonder if it was an AWS bug and they fixed it. I’ll add a note in any case.

---

<div class="post-metadata">

**Author:** ![legolas](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/legolas/32/572_2.png) [@legolas](https://discourse.sst.dev/u/legolas)\
**Post date:** [August 10, 2019, 9:58am UTC](https://discourse.sst.dev/t/problem-while-creating-user-pool/1204/7 "2019-08-10T09:58:12Z")

</div>

Today, earlier in the morning, I checked it again. I think it was sum-sort of a bug. They fixed it.

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [August 18, 2019, 12:26am UTC](https://discourse.sst.dev/t/problem-while-creating-user-pool/1204/8 "2019-08-18T00:26:37Z")

</div>

Yeah definitely seemed like a bug.
