awscli now asks for token code when used with MFA enabled IAM accounts.
APACHE-2.0 License
.. image:: https://img.shields.io/pypi/v/awscli-plugin-credential-mfa.svg :target: https://pypi.python.org/pypi/awscli-plugin-credential-mfa
.. image:: https://img.shields.io/travis/seporaitis/awscli-plugin-credential-mfa/master.svg :target: https://travis-ci.org/seporaitis/awscli-plugin-credential-mfa
Automatically asks for MFA token key to retrieve temporary credentials.
Install the plugin:
.. code-block:: sh
pip install awscli-plugin-credential-mfa
Enable the plugin:
.. code-block:: sh
aws configure set plugins.credentials awscli_plugin_credential_mfa
Assuming your IAM user has MFA enabled <https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_users-self-manage-mfa-and-creds.html>
_ and credentials set up, you also need to set mfa_serial
and
source_profile
in the configuration. Below are instructions for profile default
, adjust as
appropriate
.. code-block:: ini
[default] mfa_serial = arn:aws:iam::123456789012:mfa/iam-user-name source_profile = default