cognito-backup-restore
cognito-backup-restore copied to clipboard
Allow login with Multi Factor Auth (MFA) on the command line
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
MFA is working for me, by authenticating in the CLI and using --use-env-vars