Open benbridts opened 8 years ago
I'm surprised that MFA is being asked twice when invoking multiple commands. That should be cached by the CLI.
For the second issue, because we're using boto3 to do server side completion which is separate from the CLI commands being run, I can see how we would ask for the MFA code twice. This is not ideal.
I'd like to improve this. Thanks for the feedback.
It looks like there was something wrong with my aws cli.
After clearing .aws/cli/cache/
multiple commands work. I do not know how this got corrupted.
The second case still fails.
$ rm .aws/cli/cache/*
$ aws-shell --profile account
aws> elasticbeanstalk describe-configuration-settings --application-name app --environment-name env
Enter MFA Code:
{} // output skipped
aws> elasticbeanstalk describe-configuration-settings --application-name app --environment-name env
{} // output skipped
aws> ec2 start-instances --instance-ids Enter MFA code: // hangs after supplying code, I have to hit enter twice
aws> ec2 start-instances --instance-ids
A client error (InvalidParameterCombination) occurred when calling the StartInstances operation: No instances specified
aws> elasticbeanstalk describe-configuration-settings --application-name app --environment-name env
{} // output skipped
Kind regards, Ben
Hi,
I think this bug that you keep getting prompted repeatedly when using MFA makes it unusable for sites like ours where we use MFA for all our accounts. Is there a way to toggle the server side completion? If I could just toggle it off that would be a workaround. I think that would be a good feature also for the use case where you have high latency to the aws region. Say if you are in Asia Pacific and using a US region (which we do!) latency is > 200ms.
Yes, disabling the completion would make aws-shell useable. At this point it's easier to not use it at all.
Is there any plan to resolve this? aws-shell is absolutely awesome, but this bug makes it almost useless for my day-to-day activities administering a multi-account environment where I'm constantly role switching and all roles have an MFA requirement.
If this isn't possible to solve, would it be plausible to have a toggle for the server-side autocomplete functionality, or perhaps auto-disable those calls to boto3 if the current profile is MFA protected?
I would like to use aws-shell, but we use roles with MFA authentication for all profiles. This breaks the commands that query aws and make other commands tedious to use.
my .aws/config file
.aws/credentials has the credentials for the root profile.
What happens (1): MFA is asked twice
What I expect to happen (1): MFA is asked once
What happens (2): Querying fails:
I think this may be okay if it wouldn't ask for MFA and wait with querying until you have authenticated.
What happens (3): Querying fails even after using MFA once