How to reduce latency for Cognito globally?

0

We have a global audience for our service, but since our main market is the USA, we use us-east-1 for our Cognito service.

In many cases, we have to run queries like this cURL query

curl 'https://cognito-idp.us-east-1.amazonaws.com/' \
  -H 'authority: cognito-idp.us-east-1.amazonaws.com' \
  -H 'accept: */*' \
  -H 'accept-language: en-US,en;q=0.9,de-DE;q=0.8,de;q=0.7' \
  -H 'cache-control: no-store' \
  -H 'content-type: application/x-amz-json-1.1' \
  -H 'origin: https://scraiber-frontend.pages.dev' \
  -H 'referer: https://scraiber-frontend.pages.dev/' \
  -H 'sec-ch-ua: "Chromium";v="118", "Google Chrome";v="118", "Not=A?Brand";v="99"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36' \
  -H 'x-amz-target: AWSCognitoIdentityProviderService.RespondToAuthChallenge' \
  -H 'x-amz-user-agent: aws-amplify/5.0.4 auth framework/1' \
  --data-raw '{"ChallengeName":"PASSWORD_VERIFIER","ClientId": <client-id>,"ChallengeResponses":{"USERNAME":<USERNAME>,"PASSWORD_CLAIM_SECRET_BLOCK": <PASSWORD_CLAIM_SECRET_BLOCK>,"TIMESTAMP":"Mon Nov 13 18:22:30 UTC 2023","PASSWORD_CLAIM_SIGNATURE": <PASSWORD_CLAIM_SIGNATURE>},"ClientMetadata":{}}' \
  --compressed

Sadly, when pinging this from Europ, we get around 600-700 ms, which is quite long. I am wondering whether there is some elegant solution to get the latency down for various regions like Europe, East Asia etc.?

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions