Open dandowd opened 2 years ago
Please provide complete servelress.yml
content and command output
Hi,
I have the same type of issue when my aws profile uses an MFA device. Each time I try to enter a digit of the mfa code, it appears twice on the screen!! and as a result I have an error that tells me that the MFA code is invalid!
Profile configuration
[profile xxx]
role_arn=arn:aws:iam::XXXX:role/roleName
source_profile=default
mfa_serial=arn:aws:iam::XXX:mfa/iamUser
Environment information
Environment: darwin, node 14.17.0, framework 3.21.0 (local), plugin 6.2.2, SDK 4.3.2
Serverless conf
service: xxx
useDotenv: true
provider:
name: aws
runtime: nodejs14.x
profile: ${env:AWS_PROFILE, self:custom.defaultProfile}
stage: ${opt:stage, self:custom.defaultStage}
...
.env file
AWS_REGION=eu-west-1
AWS_PROFILE=xxx
Command output
> npx sls deploy
Deploying XXX to stage v1 (eu-west-1)
112233445566de for arn:aws:iam::XXX:mfa/iamUser:
✖ Stack XXX failed to deploy (12s)
Environment: darwin, node 14.17.0, framework 3.21.0 (local), plugin 6.2.2, SDK 4.3.2
Credentials: Local, "xxx" profile
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
MultiFactorAuthentication failed with invalid MFA one time pass code.
I have entered the code 123456. As you can see each digit appears twice: 112233445566
Same happens to me, it does not wait for MFA to be entered, it continues instead, throwing this error after:
Profile XXX requires multi-factor authentication, but no MFA code callback was provided.
Are you certain it's a bug?
Is the issue caused by a plugin?
Are you using the latest v3 release?
Is there an existing issue for this?
Issue description
sls deploy
does not wait for user input when MFA is required.Steps to reproduce:
.aws/config
Below is an example aws config
Service configuration (serverless.yml) content
Command name and used flags
AWS_PROFILE=deploy sls deploy
Command output
Environment information