Or have I just not found the right options?
I want to script my config. rather than error prone manual UI.
Hi Steve,
I think it should be there. Do the docs below help?
http://docs.aws.amazon.com/cli/latest/reference/cognito-idp/index.html
Ionut.
They do very much. It seems I need to update AWS. Thanks.
@itrestian What I cannot figure is how to set the provider to be a Cognito Identity Pool via the CLI. The only way to set provider appears to be when you create using
aws congnito-identity create-identity-pool
Is there some place I can ask this? I added feedback to the website docs.
thanks
To be honest, I'm getting very confused by the inconsistent naming used for the identity pools and user pools. It varies between Web UI, CLI, docs and even this repo
For example for user pools
For the Identity Pools
For example is 'Cognito User Identity Pool' an Identity Pool as it holds federated users or in fact a User Pool? Ouch!
Can someone sort this out so we have a single distinct name for each concept and related operations? Thanks!!!!
The CLI docs say
--cognito-identity-providers (list)
A list representing a Cognito User Identity Pool and its client ID.
Shorthand Syntax:
ProviderName=string,ClientId=string ...
but it's a pair not a list as far as I can tell.
I tried to create a Identity Pool linked to a User Pool using the CLI and copying what I had done in the Web UI (and it works)
IDENTITY_POOL_NAME="BrianDARTTrial_Stage"
USER_POOL_ID="us-east-1_A2HeABQfl"
APP_CLIENT_ID="7m5nr6pgpe7en26q55jnic16t6"
echo AWS cognito-identity create-identity-pool --identity-pool-name $IDENTITY_POOL_NAME --no-allow-unauthenticated-identities --cognito-identity-providers ProviderName=$USER_POOL_ID,ClientId=$APP_CLIENT_ID
but it fails with "Invalid Cognito Identity Provider". It doesn;t say which arg it is but I guess USER_POOL_ID or APP_CLIENT_ID. All 3 are exactly a showin in the web UI when I set up manually.
woah, hold on I just spotted the docs saying
ProviderName -> (string)
The provider name for a Cognito User Identity Pool. For example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789 .
That makes it work. Bizzar
I think the format should be that used in the web UI. ie without the 'cognito-idp.us-east-1.amazonaws.com/' prefix
thanks
woah, hold on I just spotted the docs saying
ProviderName -> (string)
The provider name for a Cognito User Identity Pool. For example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789 .
Where does that format come from - never seen it before!?
But it makes it work. Bizzar
I think the format should be that used in the web UI. ie without the 'cognito-idp.us-east-1.amazonaws.com/' prefix
thanks
boy, this has taken forever to get working :(
I'll be so happy when serverless support it :)
Hi Steve, did you manage to solve it?
The format is documented here I believe
http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentity.html#getId-property
Ionut.
Yes I did thanks. I had not found those docs before. Very useful, though Java not javascript
There's an awful lot of docs so I started using the code, at least that available :)
FYI, Here's my effort that worked
Most helpful comment
To be honest, I'm getting very confused by the inconsistent naming used for the identity pools and user pools. It varies between Web UI, CLI, docs and even this repo
For example for user pools
For the Identity Pools
For example is 'Cognito User Identity Pool' an Identity Pool as it holds federated users or in fact a User Pool? Ouch!
Can someone sort this out so we have a single distinct name for each concept and related operations? Thanks!!!!
The CLI docs say
but it's a pair not a list as far as I can tell.