Amazon-cognito-identity-js: No User Pool access in AWS CLI utility

Created on 5 May 2016  路  10Comments  路  Source: amazon-archives/amazon-cognito-identity-js

Or have I just not found the right options?

I want to script my config. rather than error prone manual UI.

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

  • The web UI use User Pools
  • the cli uses both cognito-idp, user pool and CognitoIdentityProviders (?)
  • The docs use User Pools, user identities, Cognito User Identity Pool and Cognito Identity Providers,
  • this repo uses cognito-identity and user pools

For the Identity Pools

  • The web UI uses Federated Pools and cognito identity Pools
  • the cli uses cognito-indentity, indentity pool,
  • the docs use 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.

All 10 comments

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

  1. There is no 'key' given for Cognito Identity Pools in the docs
  2. Cognito Identity Pool require a second param where all the others only take one as per docs
  3. The AWS CLI help is the same as the docs

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

  • The web UI use User Pools
  • the cli uses both cognito-idp, user pool and CognitoIdentityProviders (?)
  • The docs use User Pools, user identities, Cognito User Identity Pool and Cognito Identity Providers,
  • this repo uses cognito-identity and user pools

For the Identity Pools

  • The web UI uses Federated Pools and cognito identity Pools
  • the cli uses cognito-indentity, indentity pool,
  • the docs use 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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ZwaarContrast picture ZwaarContrast  路  4Comments

magnattic picture magnattic  路  5Comments

carlnordenfelt picture carlnordenfelt  路  5Comments

m-schrepel picture m-schrepel  路  6Comments

sarah-pixvana picture sarah-pixvana  路  4Comments