3

I'm creating one api with express-js and Cognito for users management, but every query in cognito takes at least 700ms to return the data... this is very slow!! How can i speed this up?

Have configs in AWS to reduce network delay?

import AWS from 'aws-sdk';

const Cognito = new AWS.CognitoIdentityServiceProvider({
  region: '...',
  accessKeyId: '...',
  secretAccessKey: '...',
});

const data = await Cognito.getUser({
  AccessToken
}).promise();

return {
  ...data,
  userName: data.Username,
};
  • Did you ever figure out a solution? I'm dealing with the same issues trying to remove the aws SDK from my front end to reduce the bundle size. – Braydon Harris Dec 10 '21 at 19:52

0 Answers0