> For the complete documentation index, see [llms.txt](https://dhavaln.gitbook.io/serverless-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dhavaln.gitbook.io/serverless-docs/signup-signin/create-the-identity-pool.md).

# Create the Identity Pool

Now, our application is ready but does not have any AWS credentials to use any of the AWS services directly. To allow our application to use AWS services like S3, we will need to configure an Identity pool and assign a role with an authenticated user.

* Go to the `Federated identities` from the top-left section in Cognito console
* Select `Create new identity pool`&#x20;
* Give the `identity pool name`
* Open the `Authentication providers` section
* Here we will configure the source of our user data, in our case, it would be a Cognito User Pool that we previously created.&#x20;
* Copy the `User Pool ID` and `App client id` from the app-config.js configuration here
* Continue the setup with `Create Pool`
* Now we will need to attach the `IAM Roles` to our Identity pool. You will see two roles, one for Authenticated and the next one for Unauthenticated users.&#x20;
* Authenticated users are those who have a valid Cognito user pool session after doing the sign-in, and Unauthenticated users are those who are yet to either signup or has a valid user but not yet signed in.
* We will keep this to default and complete the setup with `Allow` command at the bottom
* Copy the `Identity pool id` and save to app-config.js

Now our app contains both the Cognito user pool and the Cognito identity pool. Move the current changes to the S3 bucket and reload the app. If you are already signed-in then the log should show the token and expiry detail.

![Identity Pool for the app](/files/-MCeDEVv93qVK_97vtQ6)

Reload the application now and it should work.

![Identity Pool is ready to use](/files/-MCeDuqV0-fCEQvGyGZg)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://dhavaln.gitbook.io/serverless-docs/signup-signin/create-the-identity-pool.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
