diff --git a/src/pentesting-cloud/aws-security/aws-services/aws-cognito-enum/cognito-identity-pools.md b/src/pentesting-cloud/aws-security/aws-services/aws-cognito-enum/cognito-identity-pools.md index 2b8d278747..7f5fd1845d 100644 --- a/src/pentesting-cloud/aws-security/aws-services/aws-cognito-enum/cognito-identity-pools.md +++ b/src/pentesting-cloud/aws-security/aws-services/aws-cognito-enum/cognito-identity-pools.md @@ -167,22 +167,36 @@ For this you might need to have access to the **identity provider**. If that is Anyway, the **following example** expects that you have already logged in inside a **Cognito User Pool** used to access the Identity Pool (don't forget that other types of identity providers could also be configured). -
aws cognito-identity get-id \
- --identity-pool-id \
- --logins cognito-idp..amazonaws.com/=
+
+# Updated format
+aws cognito-identity get-id \
+ --identity-pool-id \
+ --logins '{"cognito-idp..amazonaws.com/": ""}'
-# Get the identity_id from the previous commnad response
aws cognito-identity get-credentials-for-identity \
- --identity-id \
- --logins cognito-idp..amazonaws.com/=
+ --identity-id \
+ --logins '{"cognito-idp..amazonaws.com/": ""}'
+aws cognito-identity get-credentials-for-identity \
+ --identity-id \
+ --custom-role-arn \
+ --logins '{"cognito-idp..amazonaws.com/": ""}'
+
+
+> **Deprecated format** — these may no longer work with current AWS CLI:
+
+aws cognito-identity get-id \
+ --identity-pool-id \
+ --logins cognito-idp..amazonaws.com/=
+
+aws cognito-identity get-credentials-for-identity \
+ --identity-id \
+ --logins cognito-idp..amazonaws.com/=
-# In the IdToken you can find roles a user has access because of User Pool Groups
-# User the --custom-role-arn to get credentials to a specific role
aws cognito-identity get-credentials-for-identity \
- --identity-id \
- --custom-role-arn \
- --logins cognito-idp..amazonaws.com/=
+ --identity-id \
+ --custom-role-arn \
+ --logins cognito-idp..amazonaws.com/=
> [!WARNING]