在哪里找到Cognito的身份池ID
问题描述:
Cognito控制台中的身份池在哪里。如文档中所述,其格式为:
Where is Identity Pool in Cognito Console. As said in docs it has format:
IdentityPoolId
IdentityPoolId
身份池ID格式为REGION:GUID。
An identity pool ID in the format REGION:GUID.
但是我只看到 Pool ID
和在控制台中 Pool ARN
。
But I see only Pool Id
and Pool ARN
in the console. Which has different format.
答
我可以设法获取 IdentityPooId
通过aws cli:
I can manage to get the IdentityPooId
by aws cli:
aws cognito-identity list-identity-pools --max-results 10
命令返回为您的帐户注册的所有Cognito身份池。
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>"
}
]
}