Cognito user pool without MFA

Configure the additional authentication required for password sign-in.

Description

With MfaConfiguration: "OFF", a Cognito user pool does not require MFA for its own password sign-ins. OPTIONAL applies MFA only to users who set it up.

Potential impact

Without a second factor, someone who knows a user’s password may be able to sign in.

Remediation

To require MFA, set MfaConfiguration: "ON" and enable a supported factor. Test new-user enrollment, subsequent sign-in and recovery after device loss. Federated users follow their external IdP’s MFA policy.

Examples

The second example enables SOFTWARE_TOKEN_MFA. Users must enroll an authenticator app. A custom sign-in interface must handle setup and the verification-code challenge.

Before

yaml
Resources:
  UserPool:
    Type: AWS::Cognito::UserPool
    Properties:
      UserPoolName: my-user-pool
      MfaConfiguration: "OFF"

After

yaml
Resources:
  UserPool:
    Type: AWS::Cognito::UserPool
    Properties:
      UserPoolName: my-user-pool
      MfaConfiguration: "ON"
      EnabledMfas:
        - SOFTWARE_TOKEN_MFA

References