Fork me on GitHub
Jungwoo Kim06:01:45

Hi, TL;DR) I’m struggling to find any clues to investigate and reduce a red area in the picture about GraphQL response. captured by Datadog. I’m using to call a dynamodb api on GraphQL. I also use to resolve N+1 problems with interval settings. To handle an aws client, I have declared a single aws client in a single server. (sometimes it reached under the stress test). For some reasons, if I just query of GraphQL calling only aurora db, that problem doesnt occur. So dynamodb looks suspicious but not sure. Is there anyone experienced with this sort of response patterns?

Jungwoo Kim06:01:04

is that possible that a long wait of requests/responses even though ops limit error is not happened?

Jungwoo Kim06:01:56

let me know if you have any information to get to know this phenomenon.


I am using Pedestal and try to call AWS Cognito idp API with cognitect aws library. Created a User Pool at Cognito, and created new IAM user. I have set up the credential & config files at .aws directory. The AWS CLI call works just fine, and showing the User Pool Information as below: $$> aws cognito-idp list-user-pools --region us-west-1 --max-results 10 { "UserPools": [ { "Id": "us-west-1_uVhjybJkfk", "Name": "XXXXXX", "LambdaConfig": {}, "LastModifiedDate": "2023-01-19T23:09:55.977000-08:00", "CreationDate": "2023-01-19T23:09:55.977000-08:00" } ] } But the from the REPL using Cognitect API: (aws/invoke cognito-idp {:op :SignUp :request {:ClientId "XXXXXXXX" :Username "<mailto:[email protected]|[email protected]>" :Password "Password" :SecretHash (calculate-secret-hash {:client-id "-------" :client-secret "--------" :username "<mailto:[email protected]|[email protected]>"})}}) => {:type "ResourceNotFoundException", :message "User pool client XXXXXXX does not exist.", :cognitect.anomalies/category :cognitect.anomalies/incorrect} Any hints? Thanks in advance.


I think I got it solved. I am not sure this is the cause. But I found it very interesting. 1. Created a user pool on us-west-1. Run the command: % aws cognito-idp list-user-pools --region us-west-1 --max-results 10 { "UserPools": [ { "Id": "us-west-1_mUijhrymkU", "Name": "--", "LambdaConfig": {}, "LastModifiedDate": "2023-01-20T14:12:50.797000-08:00", "CreationDate": "2023-01-20T14:12:50.797000-08:00" } ] } 2. Run the command again with no region parameter: % aws cognito-idp list-user-pools --max-results 10 { "UserPools": [] } 3. Created a user pool on us-east-1. Run the command: % aws cognito-idp list-user-pools --max-results 10 { "UserPools": [ { "Id": "us-east-1_7nUtrAsfj", "Name": "----", "LambdaConfig": {}, "LastModifiedDate": "2023-01-20T14:26:53.394000-08:00", "CreationDate": "2023-01-20T14:26:53.394000-08:00" } ] } Interesting. So when I call the cognito-idp Signup API from cognitect aws api, I got this response on the REPL: {:UserConfirmed false, :CodeDeliveryDetails {:Destination "h*@UAKE446AJ*", :DeliveryMedium "EMAIL", :AttributeName "email"}, :UserSub "53bc5c-------------------24----d52"} Problem solved by creating the USER POOL in the US-EAST-1 region!! (A bug in the AWS CLI?)

👀 2