{"action":"created","comment":{"url":"https://api.github.com/repos/sportngin/aws_auditor/pulls/comments/68642058","id":68642058,"diff_hunk":"@@ -9,8 +9,37 @@ class AwsConfig < Hash\n \n   class AWSSDK\n     def self.authenticate(environment)\n-      aws = Aws::SharedCredentials.new(profile_name: environment)\n-      Aws.config.update({region: 'us-east-1', credentials: aws})\n+      shared_credentials = Aws::SharedCredentials.new(profile_name: environment)\n+      Aws.config.update({region: 'us-east-1', credentials: shared_credentials})\n+\n+      iam = Aws::IAM::Client.new\n+      iam.list_mfa_devices.mfa_devices.each do |mfadevice|\n+        mfa_serial_number = mfadevice.serial_number\n+        if mfa_serial_number","path":"lib/aws_auditor/aws.rb","position":58,"original_position":12,"commit_id":"95136c8e6d939960f635f8b9e656dc70439128b8","original_commit_id":"95136c8e6d939960f635f8b9e656dc70439128b8","user":{"login":"bbergstrom","id":921833,"avatar_url":"https://avatars.githubusercontent.com/u/921833?v=3","gravatar_id":"","url":"https://api.github.com/users/bbergstrom","html_url":"https://github.com/bbergstrom","followers_url":"https://api.github.com/users/bbergstrom/followers","following_url":"https://api.github.com/users/bbergstrom/following{/other_user}","gists_url":"https://api.github.com/users/bbergstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/bbergstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbergstrom/subscriptions","organizations_url":"https://api.github.com/users/bbergstrom/orgs","repos_url":"https://api.github.com/users/bbergstrom/repos","events_url":"https://api.github.com/users/bbergstrom/events{/privacy}","received_events_url":"https://api.github.com/users/bbergstrom/received_events","type":"User","site_admin":false},"body":"Lets take this block out of the iterator since only one device is supported.\r\n\r\nFrom:  http://aws.amazon.com/iam/faqs/#MFA_FAQs\r\n```\r\nQ. Can I have multiple authentication devices active for my AWS account?\r\nYes. Each IAM user can have its own authentication device. However, each identity (IAM user or root account) can be associated with only one authentication device.\r\n```","created_at":"2016-06-27T19:41:24Z","updated_at":"2016-06-27T19:41:24Z","html_url":"https://github.com/sportngin/aws_auditor/pull/3#discussion_r68642058","pull_request_url":"https://api.github.com/repos/sportngin/aws_auditor/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/sportngin/aws_auditor/pulls/comments/68642058"},"html":{"href":"https://github.com/sportngin/aws_auditor/pull/3#discussion_r68642058"},"pull_request":{"href":"https://api.github.com/repos/sportngin/aws_auditor/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/sportngin/aws_auditor/pulls/3","id":75029219,"html_url":"https://github.com/sportngin/aws_auditor/pull/3","diff_url":"https://github.com/sportngin/aws_auditor/pull/3.diff","patch_url":"https://github.com/sportngin/aws_auditor/pull/3.patch","issue_url":"https://api.github.com/repos/sportngin/aws_auditor/issues/3","number":3,"state":"open","locked":false,"title":"Upgrading aws-sdk version from v1 to v2","user":{"login":"emmasax1","id":7562793,"avatar_url":"https://avatars.githubusercontent.com/u/7562793?v=3","gravatar_id":"","url":"https://api.github.com/users/emmasax1","html_url":"https://github.com/emmasax1","followers_url":"https://api.github.com/users/emmasax1/followers","following_url":"https://api.github.com/users/emmasax1/following{/other_user}","gists_url":"https://api.github.com/users/emmasax1/gists{/gist_id}","starred_url":"https://api.github.com/users/emmasax1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmasax1/subscriptions","organizations_url":"https://api.github.com/users/emmasax1/orgs","repos_url":"https://api.github.com/users/emmasax1/repos","events_url":"https://api.github.com/users/emmasax1/events{/privacy}","received_events_url":"https://api.github.com/users/emmasax1/received_events","type":"User","site_admin":false},"body":"Description and Impact\r\n----------------------\r\nNo change for production, just updating internal aws-sdk version.\r\n\r\nDeploy Plan\r\n-----------\r\n> Does Platform Operations need to know anything special about this deploy? Are migrations present?\r\n\r\nRollback Plan\r\n-------------\r\n* To roll back this change, revert the merge with: `git revert -m 1 MERGE_SHA` and perform another deploy.\r\n\r\nURLs\r\n----\r\nhttp://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Client.html\r\nhttp://docs.aws.amazon.com/sdkforruby/api/Aws/ElastiCache/Client.html\r\nhttp://docs.aws.amazon.com/sdkforruby/api/Aws/RDS/Client.html\r\nhttp://docs.aws.amazon.com/sdkforruby/api/\r\n\r\nQA Plan\r\n-------\r\n- [ ] Run `bin/aws-auditor audit [profile]` in both master and this branch to verify the outcomes are the same (may need to rebundle)\r\n- [ ] Run `bin/aws-auditor inspect [profile]` in both master and this branch to verify the outcomes are the same (may need to rebundle)\r\n- [ ] Run `bin/aws-auditor audit [profile` when MFA is enabled to see if it prompts for an MFA token\r\n","created_at":"2016-06-23T21:19:45Z","updated_at":"2016-06-27T19:41:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5bb469e2b3c9bd487bfe2ab0f2aae676290c182c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sportngin/aws_auditor/pulls/3/commits","review_comments_url":"https://api.github.com/repos/sportngin/aws_auditor/pulls/3/comments","review_comment_url":"https://api.github.com/repos/sportngin/aws_auditor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sportngin/aws_auditor/issues/3/comments","statuses_url":"https://api.github.com/repos/sportngin/aws_auditor/statuses/95136c8e6d939960f635f8b9e656dc70439128b8","head":{"label":"sportngin:updating-aws-sdk-v2","ref":"updating-aws-sdk-v2","sha":"95136c8e6d939960f635f8b9e656dc70439128b8","user":{"login":"sportngin","id":3728684,"avatar_url":"https://avatars.githubusercontent.com/u/3728684?v=3","gravatar_id":"","url":"https://api.github.com/users/sportngin","html_url":"https://github.com/sportngin","followers_url":"https://api.github.com/users/sportngin/followers","following_url":"https://api.github.com/users/sportngin/following{/other_user}","gists_url":"https://api.github.com/users/sportngin/gists{/gist_id}","starred_url":"https://api.github.com/users/sportngin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sportngin/subscriptions","organizations_url":"https://api.github.com/users/sportngin/orgs","repos_url":"https://api.github.com/users/sportngin/repos","events_url":"https://api.github.com/users/sportngin/events{/privacy}","received_events_url":"https://api.github.com/users/sportngin/received_events","type":"Organization","site_admin":false},"repo":{"id":46573603,"name":"aws_auditor","full_name":"sportngin/aws_auditor","owner":{"login":"sportngin","id":3728684,"avatar_url":"https://avatars.githubusercontent.com/u/3728684?v=3","gravatar_id":"","url":"https://api.github.com/users/sportngin","html_url":"https://github.com/sportngin","followers_url":"https://api.github.com/users/sportngin/followers","following_url":"https://api.github.com/users/sportngin/following{/other_user}","gists_url":"https://api.github.com/users/sportngin/gists{/gist_id}","starred_url":"https://api.github.com/users/sportngin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sportngin/subscriptions","organizations_url":"https://api.github.com/users/sportngin/orgs","repos_url":"https://api.github.com/users/sportngin/repos","events_url":"https://api.github.com/users/sportngin/events{/privacy}","received_events_url":"https://api.github.com/users/sportngin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sportngin/aws_auditor","description":"Gives a concise summary of your AWS Instances vs. Reserved Instances","fork":true,"url":"https://api.github.com/repos/sportngin/aws_auditor","forks_url":"https://api.github.com/repos/sportngin/aws_auditor/forks","keys_url":"https://api.github.com/repos/sportngin/aws_auditor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sportngin/aws_auditor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sportngin/aws_auditor/teams","hooks_url":"https://api.github.com/repos/sportngin/aws_auditor/hooks","issue_events_url":"https://api.github.com/repos/sportngin/aws_auditor/issues/events{/number}","events_url":"https://api.github.com/repos/sportngin/aws_auditor/events","assignees_url":"https://api.github.com/repos/sportngin/aws_auditor/assignees{/user}","branches_url":"https://api.github.com/repos/sportngin/aws_auditor/branches{/branch}","tags_url":"https://api.github.com/repos/sportngin/aws_auditor/tags","blobs_url":"https://api.github.com/repos/sportngin/aws_auditor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sportngin/aws_auditor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sportngin/aws_auditor/git/refs{/sha}","trees_url":"https://api.github.com/repos/sportngin/aws_auditor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sportngin/aws_auditor/statuses/{sha}","languages_url":"https://api.github.com/repos/sportngin/aws_auditor/languages","stargazers_url":"https://api.github.com/repos/sportngin/aws_auditor/stargazers","contributors_url":"https://api.github.com/repos/sportngin/aws_auditor/contributors","subscribers_url":"https://api.github.com/repos/sportngin/aws_auditor/subscribers","subscription_url":"https://api.github.com/repos/sportngin/aws_auditor/subscription","commits_url":"https://api.github.com/repos/sportngin/aws_auditor/commits{/sha}","git_commits_url":"https://api.github.com/repos/sportngin/aws_auditor/git/commits{/sha}","comments_url":"https://api.github.com/repos/sportngin/aws_auditor/comments{/number}","issue_comment_url":"https://api.github.com/repos/sportngin/aws_auditor/issues/comments{/number}","contents_url":"https://api.github.com/repos/sportngin/aws_auditor/contents/{+path}","compare_url":"https://api.github.com/repos/sportngin/aws_auditor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sportngin/aws_auditor/merges","archive_url":"https://api.github.com/repos/sportngin/aws_auditor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sportngin/aws_auditor/downloads","issues_url":"https://api.github.com/repos/sportngin/aws_auditor/issues{/number}","pulls_url":"https://api.github.com/repos/sportngin/aws_auditor/pulls{/number}","milestones_url":"https://api.github.com/repos/sportngin/aws_auditor/milestones{/number}","notifications_url":"https://api.github.com/repos/sportngin/aws_auditor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sportngin/aws_auditor/labels{/name}","releases_url":"https://api.github.com/repos/sportngin/aws_auditor/releases{/id}","deployments_url":"https://api.github.com/repos/sportngin/aws_auditor/deployments","created_at":"2015-11-20T16:30:30Z","updated_at":"2016-06-21T14:58:00Z","pushed_at":"2016-06-27T17:54:30Z","git_url":"git://github.com/sportngin/aws_auditor.git","ssh_url":"git@github.com:sportngin/aws_auditor.git","clone_url":"https://github.com/sportngin/aws_auditor.git","svn_url":"https://github.com/sportngin/aws_auditor","homepage":"","size":76,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"sportngin:master","ref":"master","sha":"35e7509f356ce8d1e422f3c097e4d2f11553dc10","user":{"login":"sportngin","id":3728684,"avatar_url":"https://avatars.githubusercontent.com/u/3728684?v=3","gravatar_id":"","url":"https://api.github.com/users/sportngin","html_url":"https://github.com/sportngin","followers_url":"https://api.github.com/users/sportngin/followers","following_url":"https://api.github.com/users/sportngin/following{/other_user}","gists_url":"https://api.github.com/users/sportngin/gists{/gist_id}","starred_url":"https://api.github.com/users/sportngin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sportngin/subscriptions","organizations_url":"https://api.github.com/users/sportngin/orgs","repos_url":"https://api.github.com/users/sportngin/repos","events_url":"https://api.github.com/users/sportngin/events{/privacy}","received_events_url":"https://api.github.com/users/sportngin/received_events","type":"Organization","site_admin":false},"repo":{"id":46573603,"name":"aws_auditor","full_name":"sportngin/aws_auditor","owner":{"login":"sportngin","id":3728684,"avatar_url":"https://avatars.githubusercontent.com/u/3728684?v=3","gravatar_id":"","url":"https://api.github.com/users/sportngin","html_url":"https://github.com/sportngin","followers_url":"https://api.github.com/users/sportngin/followers","following_url":"https://api.github.com/users/sportngin/following{/other_user}","gists_url":"https://api.github.com/users/sportngin/gists{/gist_id}","starred_url":"https://api.github.com/users/sportngin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sportngin/subscriptions","organizations_url":"https://api.github.com/users/sportngin/orgs","repos_url":"https://api.github.com/users/sportngin/repos","events_url":"https://api.github.com/users/sportngin/events{/privacy}","received_events_url":"https://api.github.com/users/sportngin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sportngin/aws_auditor","description":"Gives a concise summary of your AWS Instances vs. Reserved Instances","fork":true,"url":"https://api.github.com/repos/sportngin/aws_auditor","forks_url":"https://api.github.com/repos/sportngin/aws_auditor/forks","keys_url":"https://api.github.com/repos/sportngin/aws_auditor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sportngin/aws_auditor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sportngin/aws_auditor/teams","hooks_url":"https://api.github.com/repos/sportngin/aws_auditor/hooks","issue_events_url":"https://api.github.com/repos/sportngin/aws_auditor/issues/events{/number}","events_url":"https://api.github.com/repos/sportngin/aws_auditor/events","assignees_url":"https://api.github.com/repos/sportngin/aws_auditor/assignees{/user}","branches_url":"https://api.github.com/repos/sportngin/aws_auditor/branches{/branch}","tags_url":"https://api.github.com/repos/sportngin/aws_auditor/tags","blobs_url":"https://api.github.com/repos/sportngin/aws_auditor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sportngin/aws_auditor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sportngin/aws_auditor/git/refs{/sha}","trees_url":"https://api.github.com/repos/sportngin/aws_auditor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sportngin/aws_auditor/statuses/{sha}","languages_url":"https://api.github.com/repos/sportngin/aws_auditor/languages","stargazers_url":"https://api.github.com/repos/sportngin/aws_auditor/stargazers","contributors_url":"https://api.github.com/repos/sportngin/aws_auditor/contributors","subscribers_url":"https://api.github.com/repos/sportngin/aws_auditor/subscribers","subscription_url":"https://api.github.com/repos/sportngin/aws_auditor/subscription","commits_url":"https://api.github.com/repos/sportngin/aws_auditor/commits{/sha}","git_commits_url":"https://api.github.com/repos/sportngin/aws_auditor/git/commits{/sha}","comments_url":"https://api.github.com/repos/sportngin/aws_auditor/comments{/number}","issue_comment_url":"https://api.github.com/repos/sportngin/aws_auditor/issues/comments{/number}","contents_url":"https://api.github.com/repos/sportngin/aws_auditor/contents/{+path}","compare_url":"https://api.github.com/repos/sportngin/aws_auditor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sportngin/aws_auditor/merges","archive_url":"https://api.github.com/repos/sportngin/aws_auditor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sportngin/aws_auditor/downloads","issues_url":"https://api.github.com/repos/sportngin/aws_auditor/issues{/number}","pulls_url":"https://api.github.com/repos/sportngin/aws_auditor/pulls{/number}","milestones_url":"https://api.github.com/repos/sportngin/aws_auditor/milestones{/number}","notifications_url":"https://api.github.com/repos/sportngin/aws_auditor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sportngin/aws_auditor/labels{/name}","releases_url":"https://api.github.com/repos/sportngin/aws_auditor/releases{/id}","deployments_url":"https://api.github.com/repos/sportngin/aws_auditor/deployments","created_at":"2015-11-20T16:30:30Z","updated_at":"2016-06-21T14:58:00Z","pushed_at":"2016-06-27T17:54:30Z","git_url":"git://github.com/sportngin/aws_auditor.git","ssh_url":"git@github.com:sportngin/aws_auditor.git","clone_url":"https://github.com/sportngin/aws_auditor.git","svn_url":"https://github.com/sportngin/aws_auditor","homepage":"","size":76,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sportngin/aws_auditor/pulls/3"},"html":{"href":"https://github.com/sportngin/aws_auditor/pull/3"},"issue":{"href":"https://api.github.com/repos/sportngin/aws_auditor/issues/3"},"comments":{"href":"https://api.github.com/repos/sportngin/aws_auditor/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/sportngin/aws_auditor/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/sportngin/aws_auditor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sportngin/aws_auditor/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/sportngin/aws_auditor/statuses/95136c8e6d939960f635f8b9e656dc70439128b8"}}}}
{"actor":{"display_login":"bbergstrom"}}