1
votes

I am trying to get identity ids in my account using aws cli get-id command. Here is the command I am using.

aws cognito-identity get-id --account-id 12345678--identity-pool-id us-east-1:12345678-1234-1234-abcd-12345678 --logins cognito-idp.us-east-1.amazonaws.com/us-east-12345678

But I keep getting the following error

Error parsing parameter '--logins': Expected: '=', received: '' for input: \cognito-idp.us-east-1.amazonaws.com/us-east-12345678"

AWS cli version is

aws-cli/2.0.56 Python/3.7.7 Windows/10 exe/AMD64

Why am I getting this error? Am I using the correct syntax ?

1

1 Answers

0
votes

The --logins argument accepts key-value pairs rather than a string as a JSON payload.

A set of optional name-value pairs that map provider names to provider tokens.

To do this you will need to generate a session token. For Cognito you will need to call the initiate-auth function and then use this token in your request.

The payload would look like the below

{ "cognito-idp.us-east-1.amazonaws.com/us-east-12345678": "Token" }