AWS Cognito Free Tier and InitiateAuth command

0

Hello.

I want to add Cognito as an identity provider solution in my application. It is necessary to track when users log in and log out, so I plan to use a server-side auth solution similar to this:

const initiateAuth = ({ username, password, clientId }) => {
  const client = new CognitoIdentityProviderClient({});

  const command = new InitiateAuthCommand({
    AuthFlow: AuthFlowType.USER_PASSWORD_AUTH,
    AuthParameters: {
      USERNAME: username,
      PASSWORD: password,
    },
    ClientId: clientId,
  });

  return client.send(command);
};

(taken from https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/javascript_cognito-identity-provider_code_examples.html)

Does the 50 000 MAU free tier still apply to my use case (using login/password authentication on the server side instead of using it in a web browser of a client), or is it billed differently?

1 Answer
2
Accepted Answer

Hi Illia!

From the Amazon Cognito pricing page:

You pay for Amazon Cognito user pools based on your monthly active users (MAUs). A user is counted as a MAU if, within a calendar month, your app generates an identity operation for that user, like administrative creation or update, sign-up, sign-in, sign-out, token refresh, password change, a user account attribute update, or an attribute query on a user (AdminGetUser API). You are not charged for subsequent sessions or for inactive users within that calendar month.

Therefore, it would still apply to your use case, regardless of client or server side authentication.. Different pricing would apply if you are using SAML or OIDC for federation, or if you use Cognito's advanced security features.

Happy building!

profile pictureAWS
EXPERT
answered 3 months ago
profile picture
EXPERT
reviewed 3 months ago
profile picture
EXPERT
reviewed 3 months ago
  • Awesome, thanks a lot!

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