Where to find Identity Pool Id in Cognito
Asked Answered
P

7

55

Where is Identity Pool in Cognito Console. In the docs mentioned:

IdentityPoolId

An identity pool ID in the format REGION:GUID.

But I see only Pool Id and Pool ARN in the console. Which have different formats.

Pettifogging answered 11/6, 2017 at 7:42 Comment(3)
Nevermind, I looked at User Pools instead of Federated Identities.Pettifogging
Thanks, I had this same problem. The documentation is for Cognito/federated identities is profuse but also terrible, and code samples are always out of date or off tangent.Meeker
You might as well expand that comment into an answer.Hesson
T
41

I can manage to get the IdentityPooId by aws cli:

aws cognito-identity list-identity-pools --max-results 10

The command returns all of the Cognito identity pools registered for your account.

{
    "IdentityPools": [
        {
            "IdentityPoolId": "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab",
            "IdentityPoolName": "<some custom name>"
        }
    ]
}
Traffic answered 11/12, 2018 at 10:21 Comment(0)
P
29

You can find Identity pool ID if you select Manage Federated Identities on the page https://eu-west-1.console.aws.amazon.com/cognito/home?region=eu-west-1 and create an Federated Identity.

Alt text

Pettifogging answered 27/11, 2017 at 14:42 Comment(0)
R
9

If you've navigated to the dashboard, you can also pull the identity pool ID from the URL:

enter image description here

Ramakrishna answered 8/1, 2019 at 2:17 Comment(0)
H
4

After creating the user pool, If you did not create associated Identity pool, Create a new one (Identity pool) and while creating it, set it as below (or as per your needs)

enter image description here

Once you click create, click Allow on the following screen then you will see the identity pool id like below

enter image description here

If you already have one, The from Cognito main screen, click Manage Identity Pools, click on the pool you want to get its Id then from side menu click "Sample Code" you will see the same screen as in the above image.

Hiroshige answered 21/5, 2020 at 6:50 Comment(0)
M
3

For folks working with AWS CloudFormation: The documentation for AWS::Cognito::IdentityPool says you can obtain the IdentityPoolId from the return value, via Ref:

Return Values > Ref: When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the IdentityPoolId, such as us-east-2:0d01f4d7-1305-4408-b437-12345EXAMPLE.

With AWS CDK, you can output the IdentityPoolId this way (Python):

core.CfnOutput(self, id='IdentityPoolId', value=idp.ref)

Where idp is an instance of CfnIdentityPool.

Mortensen answered 18/10, 2020 at 16:17 Comment(0)
H
1

Just ran into this trying to fill out amplifyconfiguration.json. Trying to figure out which identity pool was connect to the user pool. In the management console, the name top under "User Pools | Federated Identities" is the name of the identity pool. In Federated Identities, I can find the identity pool with the same name. On the dashboard, I can see the user pool id listed as one of the authentication methods. Grab the identity pool id out of the url or from the sample code like others have mentioned.

Hurlyburly answered 12/7, 2021 at 23:54 Comment(0)
E
0

You can find here: Amazon Cognito -> Federated identities:

enter image description here

Eruptive answered 4/3, 2023 at 22:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.