AWS Security ChangesHomeSearch

AWS cognito documentation change

Service: cognito · 2025-03-10 · Documentation low

File: cognito/latest/developerguide/cognito-identity-provider_example_cognito-identity-provider_ListUserPools_section.md

Summary

Updated ListUserPools CLI example to show 3 pools with detailed LambdaConfig examples including PreSignUp and UserMigration triggers

Security assessment

Change provides more realistic example output but does not address security vulnerabilities. LambdaConfig examples show common configurations without security-specific guidance.

Diff

diff --git a/cognito/latest/developerguide/cognito-identity-provider_example_cognito-identity-provider_ListUserPools_section.md
index 82cdd1978..ed2242a2b 100644
--- a/cognito/latest/developerguide/cognito-identity-provider_example_cognito-identity-provider_ListUserPools_section.md
+++ b/cognito/latest/developerguide/cognito-identity-provider_example_cognito-identity-provider_ListUserPools_section.md
@@ -54 +54 @@ CLI
-This example lists up to 20 user pools.
+The following `list-user-pools` example lists 3 of the available user pools in the AWS account of the current CLI credentials.
@@ -56 +55,0 @@ This example lists up to 20 user pools.
-Command:
@@ -58,2 +57,2 @@ Command:
-    
-    aws cognito-idp list-user-pools --max-results 20
+    aws cognito-idp list-user-pools \
+        --max-results 3
@@ -65,0 +65 @@ Output:
+        "NextToken": "[Pagination token]",
@@ -68,5 +68,30 @@ Output:
-             "CreationDate": 1547763720.822,
-             "LastModifiedDate": 1547763720.822,
-             "LambdaConfig": {},
-             "Id": "us-west-2_aaaaaaaaa",
-             "Name": "MyUserPool"
+                "CreationDate": 1681502497.741,
+                "Id": "us-west-2_EXAMPLE1",
+                "LambdaConfig": {
+                    "CustomMessage": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
+                    "PreSignUp": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
+                    "PreTokenGeneration": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
+                    "PreTokenGenerationConfig": {
+                        "LambdaArn": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
+                        "LambdaVersion": "V1_0"
+                    }
+                },
+                "LastModifiedDate": 1681502497.741,
+                "Name": "user pool 1"
+            },
+            {
+                "CreationDate": 1686064178.717,
+                "Id": "us-west-2_EXAMPLE2",
+                "LambdaConfig": {
+                },
+                "LastModifiedDate": 1686064178.873,
+                "Name": "user pool 2"
+            },
+            {
+                "CreationDate": 1627681712.237,
+                "Id": "us-west-2_EXAMPLE3",
+                "LambdaConfig": {
+                    "UserMigration": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction"
+                },
+                "LastModifiedDate": 1678486942.479,
+                "Name": "user pool 3"
@@ -76,0 +102,2 @@ Output:
+For more information, see [Amazon Cognito user pools](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools.html) in the _Amazon Cognito Developer Guide_.
+