{"action":"created","comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments/38506493","id":38506493,"diff_hunk":"@@ -59,6 +66,29 @@ public DescribeInstances(AwsConfig awsConfig, String endpoint) {\n         attributes.put(\"X-Amz-Expires\", \"30\");\r\n     }\r\n \r\n+    private void getKeysFromIamRole() {\r\n+        try {\r\n+            String query = \"latest/meta-data/iam/security-credentials/\" + awsConfig.getIamRole();\r\n+            URL url = new URL(\"http\", \"169.254.169.254\", -1, query);\r\n+            InputStreamReader is = new InputStreamReader(url.openStream(), \"UTF-8\");\r\n+            BufferedReader reader = new BufferedReader(is);\r\n+            Pattern pattern = Pattern.compile(\": \\\"(.*?)\\\",\");\r\n+            for (String line; (line = reader.readLine()) != null; ) {\r\n+                Matcher matcher = pattern.matcher(line);\r\n+                if (line.contains(\"AccessKeyId\") && matcher.find()) {\r\n+                    awsConfig.setAccessKey(matcher.group(1));\r\n+                }\r\n+                if (line.contains(\"SecretAccessKey\") && matcher.find()) {\r\n+                    awsConfig.setSecretKey(matcher.group(1));\r\n+                }\r\n+                if (line.contains(\"Token\") && matcher.find()) {\r\n+                    attributes.put(\"X-Amz-Security-Token\", matcher.group(1));\r\n+                }\r\n+            }\r\n+        } catch (IOException io) {\r","path":"hazelcast-cloud/src/main/java/com/hazelcast/aws/impl/DescribeInstances.java","position":61,"original_position":61,"commit_id":"adf5b5fcf5b50d81e213af5decb95228246da597","original_commit_id":"adf5b5fcf5b50d81e213af5decb95228246da597","user":{"login":"mesutcelik","id":823273,"avatar_url":"https://avatars.githubusercontent.com/u/823273?v=3","gravatar_id":"","url":"https://api.github.com/users/mesutcelik","html_url":"https://github.com/mesutcelik","followers_url":"https://api.github.com/users/mesutcelik/followers","following_url":"https://api.github.com/users/mesutcelik/following{/other_user}","gists_url":"https://api.github.com/users/mesutcelik/gists{/gist_id}","starred_url":"https://api.github.com/users/mesutcelik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesutcelik/subscriptions","organizations_url":"https://api.github.com/users/mesutcelik/orgs","repos_url":"https://api.github.com/users/mesutcelik/repos","events_url":"https://api.github.com/users/mesutcelik/events{/privacy}","received_events_url":"https://api.github.com/users/mesutcelik/received_events","type":"User","site_admin":false},"body":"empty catch.. we should fail-fast here.","created_at":"2015-09-02T07:53:12Z","updated_at":"2015-09-02T07:53:12Z","html_url":"https://github.com/hazelcast/hazelcast/pull/6110#discussion_r38506493","pull_request_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6110","_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments/38506493"},"html":{"href":"https://github.com/hazelcast/hazelcast/pull/6110#discussion_r38506493"},"pull_request":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6110"}}},"pull_request":{"url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6110","id":43939073,"html_url":"https://github.com/hazelcast/hazelcast/pull/6110","diff_url":"https://github.com/hazelcast/hazelcast/pull/6110.diff","patch_url":"https://github.com/hazelcast/hazelcast/pull/6110.patch","issue_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/6110","number":6110,"state":"open","locked":false,"title":"added IAM Role support to hz-cloud","user":{"login":"bilalyasar","id":7314547,"avatar_url":"https://avatars.githubusercontent.com/u/7314547?v=3","gravatar_id":"","url":"https://api.github.com/users/bilalyasar","html_url":"https://github.com/bilalyasar","followers_url":"https://api.github.com/users/bilalyasar/followers","following_url":"https://api.github.com/users/bilalyasar/following{/other_user}","gists_url":"https://api.github.com/users/bilalyasar/gists{/gist_id}","starred_url":"https://api.github.com/users/bilalyasar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bilalyasar/subscriptions","organizations_url":"https://api.github.com/users/bilalyasar/orgs","repos_url":"https://api.github.com/users/bilalyasar/repos","events_url":"https://api.github.com/users/bilalyasar/events{/privacy}","received_events_url":"https://api.github.com/users/bilalyasar/received_events","type":"User","site_admin":false},"body":"closes https://github.com/hazelcast/hazelcast/issues/2630","created_at":"2015-09-01T23:30:43Z","updated_at":"2015-09-02T07:53:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"782fad1d83e5780c3a9263399d1b159756d19dd4","assignee":null,"milestone":{"url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/61","html_url":"https://github.com/hazelcast/hazelcast/milestones/3.6","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/61/labels","id":982584,"number":61,"title":"3.6","description":"","creator":{"login":"enesakar","id":234086,"avatar_url":"https://avatars.githubusercontent.com/u/234086?v=3","gravatar_id":"","url":"https://api.github.com/users/enesakar","html_url":"https://github.com/enesakar","followers_url":"https://api.github.com/users/enesakar/followers","following_url":"https://api.github.com/users/enesakar/following{/other_user}","gists_url":"https://api.github.com/users/enesakar/gists{/gist_id}","starred_url":"https://api.github.com/users/enesakar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enesakar/subscriptions","organizations_url":"https://api.github.com/users/enesakar/orgs","repos_url":"https://api.github.com/users/enesakar/repos","events_url":"https://api.github.com/users/enesakar/events{/privacy}","received_events_url":"https://api.github.com/users/enesakar/received_events","type":"User","site_admin":false},"open_issues":145,"closed_issues":347,"state":"open","created_at":"2015-02-17T09:27:09Z","updated_at":"2015-09-02T07:27:13Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6110/commits","review_comments_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6110/comments","review_comment_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/6110/comments","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast/statuses/adf5b5fcf5b50d81e213af5decb95228246da597","head":{"label":"bilalyasar:jclouds","ref":"jclouds","sha":"adf5b5fcf5b50d81e213af5decb95228246da597","user":{"login":"bilalyasar","id":7314547,"avatar_url":"https://avatars.githubusercontent.com/u/7314547?v=3","gravatar_id":"","url":"https://api.github.com/users/bilalyasar","html_url":"https://github.com/bilalyasar","followers_url":"https://api.github.com/users/bilalyasar/followers","following_url":"https://api.github.com/users/bilalyasar/following{/other_user}","gists_url":"https://api.github.com/users/bilalyasar/gists{/gist_id}","starred_url":"https://api.github.com/users/bilalyasar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bilalyasar/subscriptions","organizations_url":"https://api.github.com/users/bilalyasar/orgs","repos_url":"https://api.github.com/users/bilalyasar/repos","events_url":"https://api.github.com/users/bilalyasar/events{/privacy}","received_events_url":"https://api.github.com/users/bilalyasar/received_events","type":"User","site_admin":false},"repo":{"id":24790601,"name":"hazelcast","full_name":"bilalyasar/hazelcast","owner":{"login":"bilalyasar","id":7314547,"avatar_url":"https://avatars.githubusercontent.com/u/7314547?v=3","gravatar_id":"","url":"https://api.github.com/users/bilalyasar","html_url":"https://github.com/bilalyasar","followers_url":"https://api.github.com/users/bilalyasar/followers","following_url":"https://api.github.com/users/bilalyasar/following{/other_user}","gists_url":"https://api.github.com/users/bilalyasar/gists{/gist_id}","starred_url":"https://api.github.com/users/bilalyasar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bilalyasar/subscriptions","organizations_url":"https://api.github.com/users/bilalyasar/orgs","repos_url":"https://api.github.com/users/bilalyasar/repos","events_url":"https://api.github.com/users/bilalyasar/events{/privacy}","received_events_url":"https://api.github.com/users/bilalyasar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bilalyasar/hazelcast","description":"Open Source In-Memory Data Grid","fork":true,"url":"https://api.github.com/repos/bilalyasar/hazelcast","forks_url":"https://api.github.com/repos/bilalyasar/hazelcast/forks","keys_url":"https://api.github.com/repos/bilalyasar/hazelcast/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bilalyasar/hazelcast/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bilalyasar/hazelcast/teams","hooks_url":"https://api.github.com/repos/bilalyasar/hazelcast/hooks","issue_events_url":"https://api.github.com/repos/bilalyasar/hazelcast/issues/events{/number}","events_url":"https://api.github.com/repos/bilalyasar/hazelcast/events","assignees_url":"https://api.github.com/repos/bilalyasar/hazelcast/assignees{/user}","branches_url":"https://api.github.com/repos/bilalyasar/hazelcast/branches{/branch}","tags_url":"https://api.github.com/repos/bilalyasar/hazelcast/tags","blobs_url":"https://api.github.com/repos/bilalyasar/hazelcast/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bilalyasar/hazelcast/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bilalyasar/hazelcast/git/refs{/sha}","trees_url":"https://api.github.com/repos/bilalyasar/hazelcast/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bilalyasar/hazelcast/statuses/{sha}","languages_url":"https://api.github.com/repos/bilalyasar/hazelcast/languages","stargazers_url":"https://api.github.com/repos/bilalyasar/hazelcast/stargazers","contributors_url":"https://api.github.com/repos/bilalyasar/hazelcast/contributors","subscribers_url":"https://api.github.com/repos/bilalyasar/hazelcast/subscribers","subscription_url":"https://api.github.com/repos/bilalyasar/hazelcast/subscription","commits_url":"https://api.github.com/repos/bilalyasar/hazelcast/commits{/sha}","git_commits_url":"https://api.github.com/repos/bilalyasar/hazelcast/git/commits{/sha}","comments_url":"https://api.github.com/repos/bilalyasar/hazelcast/comments{/number}","issue_comment_url":"https://api.github.com/repos/bilalyasar/hazelcast/issues/comments{/number}","contents_url":"https://api.github.com/repos/bilalyasar/hazelcast/contents/{+path}","compare_url":"https://api.github.com/repos/bilalyasar/hazelcast/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bilalyasar/hazelcast/merges","archive_url":"https://api.github.com/repos/bilalyasar/hazelcast/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bilalyasar/hazelcast/downloads","issues_url":"https://api.github.com/repos/bilalyasar/hazelcast/issues{/number}","pulls_url":"https://api.github.com/repos/bilalyasar/hazelcast/pulls{/number}","milestones_url":"https://api.github.com/repos/bilalyasar/hazelcast/milestones{/number}","notifications_url":"https://api.github.com/repos/bilalyasar/hazelcast/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bilalyasar/hazelcast/labels{/name}","releases_url":"https://api.github.com/repos/bilalyasar/hazelcast/releases{/id}","created_at":"2014-10-04T13:43:29Z","updated_at":"2015-04-25T12:32:28Z","pushed_at":"2015-09-01T23:29:53Z","git_url":"git://github.com/bilalyasar/hazelcast.git","ssh_url":"git@github.com:bilalyasar/hazelcast.git","clone_url":"https://github.com/bilalyasar/hazelcast.git","svn_url":"https://github.com/bilalyasar/hazelcast","homepage":"www.hazelcast.com","size":76595,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"hazelcast:master","ref":"master","sha":"23a62521284ceed383ea008532efb255d1d92645","user":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars.githubusercontent.com/u/1453152?v=3","gravatar_id":"","url":"https://api.github.com/users/hazelcast","html_url":"https://github.com/hazelcast","followers_url":"https://api.github.com/users/hazelcast/followers","following_url":"https://api.github.com/users/hazelcast/following{/other_user}","gists_url":"https://api.github.com/users/hazelcast/gists{/gist_id}","starred_url":"https://api.github.com/users/hazelcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hazelcast/subscriptions","organizations_url":"https://api.github.com/users/hazelcast/orgs","repos_url":"https://api.github.com/users/hazelcast/repos","events_url":"https://api.github.com/users/hazelcast/events{/privacy}","received_events_url":"https://api.github.com/users/hazelcast/received_events","type":"Organization","site_admin":false},"repo":{"id":3786237,"name":"hazelcast","full_name":"hazelcast/hazelcast","owner":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars.githubusercontent.com/u/1453152?v=3","gravatar_id":"","url":"https://api.github.com/users/hazelcast","html_url":"https://github.com/hazelcast","followers_url":"https://api.github.com/users/hazelcast/followers","following_url":"https://api.github.com/users/hazelcast/following{/other_user}","gists_url":"https://api.github.com/users/hazelcast/gists{/gist_id}","starred_url":"https://api.github.com/users/hazelcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hazelcast/subscriptions","organizations_url":"https://api.github.com/users/hazelcast/orgs","repos_url":"https://api.github.com/users/hazelcast/repos","events_url":"https://api.github.com/users/hazelcast/events{/privacy}","received_events_url":"https://api.github.com/users/hazelcast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hazelcast/hazelcast","description":"Open Source In-Memory Data Grid","fork":false,"url":"https://api.github.com/repos/hazelcast/hazelcast","forks_url":"https://api.github.com/repos/hazelcast/hazelcast/forks","keys_url":"https://api.github.com/repos/hazelcast/hazelcast/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hazelcast/hazelcast/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hazelcast/hazelcast/teams","hooks_url":"https://api.github.com/repos/hazelcast/hazelcast/hooks","issue_events_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/events{/number}","events_url":"https://api.github.com/repos/hazelcast/hazelcast/events","assignees_url":"https://api.github.com/repos/hazelcast/hazelcast/assignees{/user}","branches_url":"https://api.github.com/repos/hazelcast/hazelcast/branches{/branch}","tags_url":"https://api.github.com/repos/hazelcast/hazelcast/tags","blobs_url":"https://api.github.com/repos/hazelcast/hazelcast/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hazelcast/hazelcast/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hazelcast/hazelcast/git/refs{/sha}","trees_url":"https://api.github.com/repos/hazelcast/hazelcast/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast/statuses/{sha}","languages_url":"https://api.github.com/repos/hazelcast/hazelcast/languages","stargazers_url":"https://api.github.com/repos/hazelcast/hazelcast/stargazers","contributors_url":"https://api.github.com/repos/hazelcast/hazelcast/contributors","subscribers_url":"https://api.github.com/repos/hazelcast/hazelcast/subscribers","subscription_url":"https://api.github.com/repos/hazelcast/hazelcast/subscription","commits_url":"https://api.github.com/repos/hazelcast/hazelcast/commits{/sha}","git_commits_url":"https://api.github.com/repos/hazelcast/hazelcast/git/commits{/sha}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/comments{/number}","issue_comment_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/comments{/number}","contents_url":"https://api.github.com/repos/hazelcast/hazelcast/contents/{+path}","compare_url":"https://api.github.com/repos/hazelcast/hazelcast/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hazelcast/hazelcast/merges","archive_url":"https://api.github.com/repos/hazelcast/hazelcast/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hazelcast/hazelcast/downloads","issues_url":"https://api.github.com/repos/hazelcast/hazelcast/issues{/number}","pulls_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls{/number}","milestones_url":"https://api.github.com/repos/hazelcast/hazelcast/milestones{/number}","notifications_url":"https://api.github.com/repos/hazelcast/hazelcast/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/labels{/name}","releases_url":"https://api.github.com/repos/hazelcast/hazelcast/releases{/id}","created_at":"2012-03-21T12:25:18Z","updated_at":"2015-09-01T13:58:58Z","pushed_at":"2015-09-02T07:21:49Z","git_url":"git://github.com/hazelcast/hazelcast.git","ssh_url":"git@github.com:hazelcast/hazelcast.git","clone_url":"https://github.com/hazelcast/hazelcast.git","svn_url":"https://github.com/hazelcast/hazelcast","homepage":"www.hazelcast.com","size":152502,"stargazers_count":1222,"watchers_count":1222,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":594,"mirror_url":null,"open_issues_count":494,"forks":594,"open_issues":494,"watchers":1222,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6110"},"html":{"href":"https://github.com/hazelcast/hazelcast/pull/6110"},"issue":{"href":"https://api.github.com/repos/hazelcast/hazelcast/issues/6110"},"comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast/issues/6110/comments"},"review_comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6110/comments"},"review_comment":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6110/commits"},"statuses":{"href":"https://api.github.com/repos/hazelcast/hazelcast/statuses/adf5b5fcf5b50d81e213af5decb95228246da597"}}}}