Skip to content
This repository has been archived by the owner on Feb 24, 2018. It is now read-only.

No User Pool access in AWS CLI utility #23

Closed
SteveALee opened this issue May 5, 2016 · 10 comments
Closed

No User Pool access in AWS CLI utility #23

SteveALee opened this issue May 5, 2016 · 10 comments

Comments

@SteveALee
Copy link
Contributor

Or have I just not found the right options?

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

@SteveALee SteveALee changed the title N0 User Pool access in AWS CLI utility No User Pool access in AWS CLI utility May 5, 2016
@itrestian
Copy link
Contributor

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.

@SteveALee
Copy link
Contributor Author

They do very much. It seems I need to update AWS. Thanks.

@SteveALee SteveALee reopened this May 6, 2016
@SteveALee
Copy link
Contributor Author

SteveALee commented May 6, 2016

@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

@SteveALee
Copy link
Contributor Author

SteveALee commented May 6, 2016

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.

@SteveALee
Copy link
Contributor Author

SteveALee commented May 6, 2016

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.

@SteveALee
Copy link
Contributor Author

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

@SteveALee
Copy link
Contributor Author

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

@SteveALee
Copy link
Contributor Author

boy, this has taken forever to get working :(
I'll be so happy when serverless support it :)

@itrestian
Copy link
Contributor

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.

@SteveALee
Copy link
Contributor Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants