How to enable authenticator MFA for cognitio user pool created using AWS Node js API?
You can use SetUserPoolMfaConfig method after creating the user pool.
From TOTP software token MFA page.

You can activate TOTP MFA for your user pool in the Amazon Cognito console, or you can use Amazon Cognito API operations. At the user pool level, you can call SetUserPoolMfaConfig to configure MFA and enable TOTP MFA.

Here are the links of API references from AWS documentation.

SetUserPoolMfaConfig
setUserPoolMfaConfig(params = {}, callback) ⇒ AWS.Request


I am trying to create a AWS Cogntio user pool using AWS Node js SDK in a lambda function. Our use case requires multi factor authentication and enabling authenticator apps for MFA. Looks like the cognito console UI provides an option to specify this but the API does not provide a way to enable authenticator apps for MFA.
Screenshot of Cognito user pool console UI showing option to enable Authenticator apps for MFA
Tried adding
"SoftwareTokenMfaConfiguration": {
    "Enabled": true
  }


field in the params to cognitoIdentityServiceProvider.createUserPool
API but the response indicates "Error creating User Pool:
UnexpectedParameter: Unexpected key 'SoftwareTokenMfaConfiguration'
found in params"

So my code snippet looks like below:
async function createCognitoUserPool(poolName) {
  const cognitoIdentityServiceProvider =
    new AWS.CognitoIdentityServiceProvider();

  // Define the parameters for creating the user pool
  const params = {
    PoolName: poolName,
    Policies: {
      PasswordPolicy: {
        MinimumLength: 8,
        RequireUppercase: true,
        RequireLowercase: true,
        RequireNumbers: true,
        RequireSymbols: true,
      },
    },
    MfaConfiguration: "ON",
    SoftwareTokenMfaConfiguration: {
      Enabled: true,
    },
    AutoVerifiedAttributes: ["phone_number"],
    SmsConfiguration: JSON.parse(
      process.env.COGNITO_USER_POOL_SMS_CONFIGURATION
    ),
  };

  try {
    // Call the CreateUserPool method
    const response = await cognitoIdentityServiceProvider
      .createUserPool(params)
      .promise();

    console.log("User Pool created successfully:", response.UserPool.Id);
    return response.UserPool.Id;
  } catch (error) {
    console.error("Error creating User Pool:", error);
    throw error;
  }
}

Looking forward to find a solution for this. Thanks!
