{"action":"created","comment":{"url":"https://api.github.com/repos/buildbot/buildbot/pulls/comments/34583859","id":34583859,"diff_hunk":"@@ -120,15 +120,14 @@ def __init__(self, name, password, instance_type, ami=None,\n             if aws_id_file_path is None:\n                 home = os.environ['HOME']\n                 aws_id_file_path = os.path.join(home, '.ec2', 'aws_id')\n-            if not os.path.exists(aws_id_file_path):\n-                raise ValueError(\n-                    \"Please supply your AWS access key identifier and secret \"\n-                    \"access key identifier either when instantiating this %s \"\n-                    \"or in the %s file (on two lines).\\n\" %\n-                    (self.__class__.__name__, aws_id_file_path))\n-            with open(aws_id_file_path, 'r') as aws_file:\n-                identifier = aws_file.readline().strip()\n-                secret_identifier = aws_file.readline().strip()\n+                if not os.path.exists(aws_id_file_path):\n+                    aws_id_file_path = None\n+            if aws_id_file_path and os.path.exists(aws_id_file_path):","path":"master/buildbot/buildslave/ec2.py","position":25,"original_position":25,"commit_id":"8cd56347bd4f6a980c4f5c8cdb799066854879e5","original_commit_id":"8cd56347bd4f6a980c4f5c8cdb799066854879e5","user":{"login":"sa2ajj","id":447092,"avatar_url":"https://avatars.githubusercontent.com/u/447092?v=3","gravatar_id":"","url":"https://api.github.com/users/sa2ajj","html_url":"https://github.com/sa2ajj","followers_url":"https://api.github.com/users/sa2ajj/followers","following_url":"https://api.github.com/users/sa2ajj/following{/other_user}","gists_url":"https://api.github.com/users/sa2ajj/gists{/gist_id}","starred_url":"https://api.github.com/users/sa2ajj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sa2ajj/subscriptions","organizations_url":"https://api.github.com/users/sa2ajj/orgs","repos_url":"https://api.github.com/users/sa2ajj/repos","events_url":"https://api.github.com/users/sa2ajj/events{/privacy}","received_events_url":"https://api.github.com/users/sa2ajj/received_events","type":"User","site_admin":false},"body":"I think the warning should be issued even if the specified file does not exist.","created_at":"2015-07-14T15:51:51Z","updated_at":"2015-07-14T15:51:51Z","html_url":"https://github.com/buildbot/buildbot/pull/1770#discussion_r34583859","pull_request_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1770","_links":{"self":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/comments/34583859"},"html":{"href":"https://github.com/buildbot/buildbot/pull/1770#discussion_r34583859"},"pull_request":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1770"}}},"pull_request":{"url":"https://api.github.com/repos/buildbot/buildbot/pulls/1770","id":39863230,"html_url":"https://github.com/buildbot/buildbot/pull/1770","diff_url":"https://github.com/buildbot/buildbot/pull/1770.diff","patch_url":"https://github.com/buildbot/buildbot/pull/1770.patch","issue_url":"https://api.github.com/repos/buildbot/buildbot/issues/1770","number":1770,"state":"open","locked":false,"title":"Allow boto to handle ec2 latent slave auth, deprecate custom credentials file","user":{"login":"apilloud","id":5972627,"avatar_url":"https://avatars.githubusercontent.com/u/5972627?v=3","gravatar_id":"","url":"https://api.github.com/users/apilloud","html_url":"https://github.com/apilloud","followers_url":"https://api.github.com/users/apilloud/followers","following_url":"https://api.github.com/users/apilloud/following{/other_user}","gists_url":"https://api.github.com/users/apilloud/gists{/gist_id}","starred_url":"https://api.github.com/users/apilloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apilloud/subscriptions","organizations_url":"https://api.github.com/users/apilloud/orgs","repos_url":"https://api.github.com/users/apilloud/repos","events_url":"https://api.github.com/users/apilloud/events{/privacy}","received_events_url":"https://api.github.com/users/apilloud/received_events","type":"User","site_admin":false},"body":"The Buildbot EC2 latent slave code currently uses a custom '.ec2/aws_id' file to store credentials and asserts that credentials are provided explicitly or via this file. This change deprecates the custom file and delegates authentication to boto rather than asserting. This adds support for authenticating via [IAM Roles for EC2 Instances](https://aws.amazon.com/about-aws/whats-new/2012/06/11/Announcing-IAM-Roles-for-EC2-instances/), which was added to Boto in 2.5.1 (boto/boto#811).  It also adds support for the [standardized AWS Credentials file](http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs) which was added to Boto in 2.29.0 (boto/boto#2292).\r\n\r\nWill follow up with a backport to eight once merged.","created_at":"2015-07-13T22:19:57Z","updated_at":"2015-07-14T15:51:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"846e94db71579d90dd9435922f70fea1a5825faf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1770/commits","review_comments_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1770/comments","review_comment_url":"https://api.github.com/repos/buildbot/buildbot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/buildbot/buildbot/issues/1770/comments","statuses_url":"https://api.github.com/repos/buildbot/buildbot/statuses/8cd56347bd4f6a980c4f5c8cdb799066854879e5","head":{"label":"apilloud:fix_ec2_auth","ref":"fix_ec2_auth","sha":"8cd56347bd4f6a980c4f5c8cdb799066854879e5","user":{"login":"apilloud","id":5972627,"avatar_url":"https://avatars.githubusercontent.com/u/5972627?v=3","gravatar_id":"","url":"https://api.github.com/users/apilloud","html_url":"https://github.com/apilloud","followers_url":"https://api.github.com/users/apilloud/followers","following_url":"https://api.github.com/users/apilloud/following{/other_user}","gists_url":"https://api.github.com/users/apilloud/gists{/gist_id}","starred_url":"https://api.github.com/users/apilloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apilloud/subscriptions","organizations_url":"https://api.github.com/users/apilloud/orgs","repos_url":"https://api.github.com/users/apilloud/repos","events_url":"https://api.github.com/users/apilloud/events{/privacy}","received_events_url":"https://api.github.com/users/apilloud/received_events","type":"User","site_admin":false},"repo":{"id":39027669,"name":"buildbot","full_name":"apilloud/buildbot","owner":{"login":"apilloud","id":5972627,"avatar_url":"https://avatars.githubusercontent.com/u/5972627?v=3","gravatar_id":"","url":"https://api.github.com/users/apilloud","html_url":"https://github.com/apilloud","followers_url":"https://api.github.com/users/apilloud/followers","following_url":"https://api.github.com/users/apilloud/following{/other_user}","gists_url":"https://api.github.com/users/apilloud/gists{/gist_id}","starred_url":"https://api.github.com/users/apilloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apilloud/subscriptions","organizations_url":"https://api.github.com/users/apilloud/orgs","repos_url":"https://api.github.com/users/apilloud/repos","events_url":"https://api.github.com/users/apilloud/events{/privacy}","received_events_url":"https://api.github.com/users/apilloud/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/apilloud/buildbot","description":"Python-based continuous integration testing framework; your pull requests are more than welcome!","fork":true,"url":"https://api.github.com/repos/apilloud/buildbot","forks_url":"https://api.github.com/repos/apilloud/buildbot/forks","keys_url":"https://api.github.com/repos/apilloud/buildbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apilloud/buildbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apilloud/buildbot/teams","hooks_url":"https://api.github.com/repos/apilloud/buildbot/hooks","issue_events_url":"https://api.github.com/repos/apilloud/buildbot/issues/events{/number}","events_url":"https://api.github.com/repos/apilloud/buildbot/events","assignees_url":"https://api.github.com/repos/apilloud/buildbot/assignees{/user}","branches_url":"https://api.github.com/repos/apilloud/buildbot/branches{/branch}","tags_url":"https://api.github.com/repos/apilloud/buildbot/tags","blobs_url":"https://api.github.com/repos/apilloud/buildbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apilloud/buildbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apilloud/buildbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/apilloud/buildbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apilloud/buildbot/statuses/{sha}","languages_url":"https://api.github.com/repos/apilloud/buildbot/languages","stargazers_url":"https://api.github.com/repos/apilloud/buildbot/stargazers","contributors_url":"https://api.github.com/repos/apilloud/buildbot/contributors","subscribers_url":"https://api.github.com/repos/apilloud/buildbot/subscribers","subscription_url":"https://api.github.com/repos/apilloud/buildbot/subscription","commits_url":"https://api.github.com/repos/apilloud/buildbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/apilloud/buildbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/apilloud/buildbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/apilloud/buildbot/issues/comments{/number}","contents_url":"https://api.github.com/repos/apilloud/buildbot/contents/{+path}","compare_url":"https://api.github.com/repos/apilloud/buildbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apilloud/buildbot/merges","archive_url":"https://api.github.com/repos/apilloud/buildbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apilloud/buildbot/downloads","issues_url":"https://api.github.com/repos/apilloud/buildbot/issues{/number}","pulls_url":"https://api.github.com/repos/apilloud/buildbot/pulls{/number}","milestones_url":"https://api.github.com/repos/apilloud/buildbot/milestones{/number}","notifications_url":"https://api.github.com/repos/apilloud/buildbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apilloud/buildbot/labels{/name}","releases_url":"https://api.github.com/repos/apilloud/buildbot/releases{/id}","created_at":"2015-07-13T17:44:20Z","updated_at":"2015-07-13T17:44:24Z","pushed_at":"2015-07-13T21:40:44Z","git_url":"git://github.com/apilloud/buildbot.git","ssh_url":"git@github.com:apilloud/buildbot.git","clone_url":"https://github.com/apilloud/buildbot.git","svn_url":"https://github.com/apilloud/buildbot","homepage":"http://buildbot.net","size":36402,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"buildbot:master","ref":"master","sha":"be917ec1566bf2e02d2c1b36424306dfe2b1c9f3","user":{"login":"buildbot","id":324515,"avatar_url":"https://avatars.githubusercontent.com/u/324515?v=3","gravatar_id":"","url":"https://api.github.com/users/buildbot","html_url":"https://github.com/buildbot","followers_url":"https://api.github.com/users/buildbot/followers","following_url":"https://api.github.com/users/buildbot/following{/other_user}","gists_url":"https://api.github.com/users/buildbot/gists{/gist_id}","starred_url":"https://api.github.com/users/buildbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildbot/subscriptions","organizations_url":"https://api.github.com/users/buildbot/orgs","repos_url":"https://api.github.com/users/buildbot/repos","events_url":"https://api.github.com/users/buildbot/events{/privacy}","received_events_url":"https://api.github.com/users/buildbot/received_events","type":"Organization","site_admin":false},"repo":{"id":760165,"name":"buildbot","full_name":"buildbot/buildbot","owner":{"login":"buildbot","id":324515,"avatar_url":"https://avatars.githubusercontent.com/u/324515?v=3","gravatar_id":"","url":"https://api.github.com/users/buildbot","html_url":"https://github.com/buildbot","followers_url":"https://api.github.com/users/buildbot/followers","following_url":"https://api.github.com/users/buildbot/following{/other_user}","gists_url":"https://api.github.com/users/buildbot/gists{/gist_id}","starred_url":"https://api.github.com/users/buildbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildbot/subscriptions","organizations_url":"https://api.github.com/users/buildbot/orgs","repos_url":"https://api.github.com/users/buildbot/repos","events_url":"https://api.github.com/users/buildbot/events{/privacy}","received_events_url":"https://api.github.com/users/buildbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/buildbot/buildbot","description":"Python-based continuous integration testing framework; your pull requests are more than welcome!","fork":false,"url":"https://api.github.com/repos/buildbot/buildbot","forks_url":"https://api.github.com/repos/buildbot/buildbot/forks","keys_url":"https://api.github.com/repos/buildbot/buildbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buildbot/buildbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buildbot/buildbot/teams","hooks_url":"https://api.github.com/repos/buildbot/buildbot/hooks","issue_events_url":"https://api.github.com/repos/buildbot/buildbot/issues/events{/number}","events_url":"https://api.github.com/repos/buildbot/buildbot/events","assignees_url":"https://api.github.com/repos/buildbot/buildbot/assignees{/user}","branches_url":"https://api.github.com/repos/buildbot/buildbot/branches{/branch}","tags_url":"https://api.github.com/repos/buildbot/buildbot/tags","blobs_url":"https://api.github.com/repos/buildbot/buildbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buildbot/buildbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buildbot/buildbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/buildbot/buildbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buildbot/buildbot/statuses/{sha}","languages_url":"https://api.github.com/repos/buildbot/buildbot/languages","stargazers_url":"https://api.github.com/repos/buildbot/buildbot/stargazers","contributors_url":"https://api.github.com/repos/buildbot/buildbot/contributors","subscribers_url":"https://api.github.com/repos/buildbot/buildbot/subscribers","subscription_url":"https://api.github.com/repos/buildbot/buildbot/subscription","commits_url":"https://api.github.com/repos/buildbot/buildbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/buildbot/buildbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/buildbot/buildbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/buildbot/buildbot/issues/comments{/number}","contents_url":"https://api.github.com/repos/buildbot/buildbot/contents/{+path}","compare_url":"https://api.github.com/repos/buildbot/buildbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buildbot/buildbot/merges","archive_url":"https://api.github.com/repos/buildbot/buildbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buildbot/buildbot/downloads","issues_url":"https://api.github.com/repos/buildbot/buildbot/issues{/number}","pulls_url":"https://api.github.com/repos/buildbot/buildbot/pulls{/number}","milestones_url":"https://api.github.com/repos/buildbot/buildbot/milestones{/number}","notifications_url":"https://api.github.com/repos/buildbot/buildbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buildbot/buildbot/labels{/name}","releases_url":"https://api.github.com/repos/buildbot/buildbot/releases{/id}","created_at":"2010-07-06T17:56:53Z","updated_at":"2015-07-14T09:42:15Z","pushed_at":"2015-07-14T09:30:47Z","git_url":"git://github.com/buildbot/buildbot.git","ssh_url":"git@github.com:buildbot/buildbot.git","clone_url":"https://github.com/buildbot/buildbot.git","svn_url":"https://github.com/buildbot/buildbot","homepage":"http://buildbot.net","size":51623,"stargazers_count":1633,"watchers_count":1633,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":728,"mirror_url":null,"open_issues_count":38,"forks":728,"open_issues":38,"watchers":1633,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1770"},"html":{"href":"https://github.com/buildbot/buildbot/pull/1770"},"issue":{"href":"https://api.github.com/repos/buildbot/buildbot/issues/1770"},"comments":{"href":"https://api.github.com/repos/buildbot/buildbot/issues/1770/comments"},"review_comments":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1770/comments"},"review_comment":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1770/commits"},"statuses":{"href":"https://api.github.com/repos/buildbot/buildbot/statuses/8cd56347bd4f6a980c4f5c8cdb799066854879e5"}}}}