cognito-backup-restore icon indicating copy to clipboard operation
cognito-backup-restore copied to clipboard

Allow login with Multi Factor Auth (MFA) on the command line

Open justhamade opened this issue 4 years ago • 1 comments

I am not able to use the command line tool because my account assumes a role and uses MFA.

It is possible to allow MFA like so

const token = '123456'
const profile = 'profile'
  const credentials = new AWS.SharedIniFileCredentials({
    profile,
    tokenCodeFn: (mfaSerial, done) => done(null, token),
  })
  AWS.config.credentials = credentials

justhamade avatar Jan 14 '20 21:01 justhamade

MFA is working for me, by authenticating in the CLI and using --use-env-vars

hauntingEcho avatar Oct 30 '20 15:10 hauntingEcho