# How to check if cognito user pool with the given name exists

**URL:** <https://forum.serverless.com/t/how-to-check-if-cognito-user-pool-with-the-given-name-exists/14306>\
**Category:** Serverless Architectures\
**Tags:** aws, lambda\
**Created:** [March 8, 2021, 8:00pm UTC](https://forum.serverless.com/t/how-to-check-if-cognito-user-pool-with-the-given-name-exists/14306 "2021-03-08T20:00:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![s1mrankaur](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/s1mrankaur/32/4850_2.png) [@s1mrankaur](https://forum.serverless.com/u/s1mrankaur)\
**Post date:** [March 8, 2021, 8:00pm UTC](https://forum.serverless.com/t/how-to-check-if-cognito-user-pool-with-the-given-name-exists/14306/1 "2021-03-08T20:00:53Z")

</div>

How can I check if a User pool with name “demo\_userpool” exists programmatically? This is assuming I only have the user pool name and not the `ARN` or `ID` .

Use case: I have a lambda function that creates user pools and I would like it to be idempotent so that I do not end up with multiple user pools for the same request.

---

<div class="post-metadata">

**Author:** ![beenmeckel](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@beenmeckel](https://forum.serverless.com/u/beenmeckel)\
**Post date:** [July 6, 2021, 9:23am UTC](https://forum.serverless.com/t/how-to-check-if-cognito-user-pool-with-the-given-name-exists/14306/3 "2021-07-06T09:23:13Z")

</div>

How can I check if a User pool with name “demo\_userpool” exists programmatically? This is assuming I only have the user pool name and not the ARN [192.168.100.1](https://1921681001.id/) [192.168.1.1](https://19216811.cam/) or ID
