Closed philsnow closed 9 years ago
For consistency, all prints should be modified to sys.stderr.write() calls in these two modified methods.
Done in db96bc33be8811c9fddb3f923a042cfc658959a5
Thanks. I might consider adding support for "autodetect expired session tokens" eventually
I have a script that checks whether
~/.aws/credentials
is older than some number of seconds, and re-runs the init-sts-session script if so before doingexec "$@"
as the very last thing.The point is to be able to run
that_script s3cmd ls
orthat_script aws s3 ls
or whatever other command, and havethat_script
notice that your temporary credential is probably expired by now and prompt you for a new MFA before trying the command.Because AWSUtils prints to stdout, e.g.
that_script s3cmd ls | sort
gets the MFA prompt mixed in with the s3cmd output. Use stderr instead so that doesn't happen.