{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-cli/issues/1235","labels_url":"https://api.github.com/repos/aws/aws-cli/issues/1235/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-cli/issues/1235/comments","events_url":"https://api.github.com/repos/aws/aws-cli/issues/1235/events","html_url":"https://github.com/aws/aws-cli/issues/1235","id":63769368,"number":1235,"title":"Provide MFA info when assuming IAM role for cross-account S3 access","user":{"login":"dnlbrky","id":6390351,"avatar_url":"https://avatars.githubusercontent.com/u/6390351?v=3","gravatar_id":"","url":"https://api.github.com/users/dnlbrky","html_url":"https://github.com/dnlbrky","followers_url":"https://api.github.com/users/dnlbrky/followers","following_url":"https://api.github.com/users/dnlbrky/following{/other_user}","gists_url":"https://api.github.com/users/dnlbrky/gists{/gist_id}","starred_url":"https://api.github.com/users/dnlbrky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnlbrky/subscriptions","organizations_url":"https://api.github.com/users/dnlbrky/orgs","repos_url":"https://api.github.com/users/dnlbrky/repos","events_url":"https://api.github.com/users/dnlbrky/events{/privacy}","received_events_url":"https://api.github.com/users/dnlbrky/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-23T16:37:21Z","updated_at":"2015-03-23T18:54:34Z","closed_at":"2015-03-23T18:54:34Z","body":"I would like to use MFA when using the CLI to easily assume roles and gain cross-account access (see #1063).\r\n\r\nThis [boto](http://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html#MFAProtectedAPI-example-assumerole) example uses the arguments `mfa_serial_number` and `mfa_token` in the sts `assume_role` call, in addition to `role_arn`.\r\n\r\nIs it possible to add an `mfa_serial_number =` line in the config file, and then add an `mfa_token` argument to the CLI call?  For instance, `aws s3api list-buckets --profile assumerProfile --mfa_token 012345`?\r\n\r\nI'm using version 1.7.10 of the CLI for 64-bit Windows, and also trying to use boto on Ubuntu within Apache Spark (pyspark).  Is there a similar method in boto that handles the sts `assume_role` call so I don't have to keep renewing my temporary credentials manually?"},"comment":{"url":"https://api.github.com/repos/aws/aws-cli/issues/comments/85143391","html_url":"https://github.com/aws/aws-cli/issues/1235#issuecomment-85143391","issue_url":"https://api.github.com/repos/aws/aws-cli/issues/1235","id":85143391,"user":{"login":"dnlbrky","id":6390351,"avatar_url":"https://avatars.githubusercontent.com/u/6390351?v=3","gravatar_id":"","url":"https://api.github.com/users/dnlbrky","html_url":"https://github.com/dnlbrky","followers_url":"https://api.github.com/users/dnlbrky/followers","following_url":"https://api.github.com/users/dnlbrky/following{/other_user}","gists_url":"https://api.github.com/users/dnlbrky/gists{/gist_id}","starred_url":"https://api.github.com/users/dnlbrky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnlbrky/subscriptions","organizations_url":"https://api.github.com/users/dnlbrky/orgs","repos_url":"https://api.github.com/users/dnlbrky/repos","events_url":"https://api.github.com/users/dnlbrky/events{/privacy}","received_events_url":"https://api.github.com/users/dnlbrky/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T18:54:34Z","updated_at":"2015-03-23T18:54:34Z","body":"I updated to 1.7.15 and added `mfa_serial = ` in the config file.  When I call `aws s3api list-buckets --profile assumerProfile` it prompts for an MFA code.\r\n\r\nI'd still like to understand how to do this in Boto, but will ask that elsewhere."}}