{"action":"created","comment":{"url":"https://api.github.com/repos/vokal/s3same/pulls/comments/54233196","id":54233196,"diff_hunk":"@@ -0,0 +1,75 @@\n+from botocore.exceptions import ClientError\n+\n+IAMName = 's3same_travis'\n+\n+def _policy_string(bucket):\n+    return \"\"\"{\n+      \"Version\": \"2012-10-17\",\n+      \"Statement\": [\n+        {\n+          \"Action\": [\n+            \"s3:ListBucket\"\n+          ],\n+          \"Effect\": \"Allow\",\n+          \"Resource\": [\n+            \"arn:aws:s3:::%(bucket)s\"\n+          ]\n+        },\n+        {\n+          \"Action\": [\n+            \"s3:PutObject\",\n+            \"s3:PutObjectAcl\"\n+          ],\n+          \"Effect\": \"Allow\",\n+          \"Resource\": [\n+            \"arn:aws:s3:::%(bucket)s/*\"\n+          ]\n+        }\n+      ]\n+    }\"\"\" % dict(bucket=bucket)","path":"s3same/iam.py","position":29,"original_position":29,"commit_id":"79f6c32cc43a51dc69670fa6e3894ee36829d9dc","original_commit_id":"36c00bb20049a68f74ca6f82613395af97807790","user":{"login":"projectweekend","id":1781431,"avatar_url":"https://avatars.githubusercontent.com/u/1781431?v=3","gravatar_id":"","url":"https://api.github.com/users/projectweekend","html_url":"https://github.com/projectweekend","followers_url":"https://api.github.com/users/projectweekend/followers","following_url":"https://api.github.com/users/projectweekend/following{/other_user}","gists_url":"https://api.github.com/users/projectweekend/gists{/gist_id}","starred_url":"https://api.github.com/users/projectweekend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectweekend/subscriptions","organizations_url":"https://api.github.com/users/projectweekend/orgs","repos_url":"https://api.github.com/users/projectweekend/repos","events_url":"https://api.github.com/users/projectweekend/events{/privacy}","received_events_url":"https://api.github.com/users/projectweekend/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2016-02-26T11:36:20Z","updated_at":"2016-02-26T11:36:20Z","html_url":"https://github.com/vokal/s3same/pull/1#discussion_r54233196","pull_request_url":"https://api.github.com/repos/vokal/s3same/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/vokal/s3same/pulls/comments/54233196"},"html":{"href":"https://github.com/vokal/s3same/pull/1#discussion_r54233196"},"pull_request":{"href":"https://api.github.com/repos/vokal/s3same/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/vokal/s3same/pulls/1","id":60779646,"html_url":"https://github.com/vokal/s3same/pull/1","diff_url":"https://github.com/vokal/s3same/pull/1.diff","patch_url":"https://github.com/vokal/s3same/pull/1.patch","issue_url":"https://api.github.com/repos/vokal/s3same/issues/1","number":1,"state":"open","locked":false,"title":"Initial implementation of s3same.","user":{"login":"vokal-isaac","id":7505072,"avatar_url":"https://avatars.githubusercontent.com/u/7505072?v=3","gravatar_id":"","url":"https://api.github.com/users/vokal-isaac","html_url":"https://github.com/vokal-isaac","followers_url":"https://api.github.com/users/vokal-isaac/followers","following_url":"https://api.github.com/users/vokal-isaac/following{/other_user}","gists_url":"https://api.github.com/users/vokal-isaac/gists{/gist_id}","starred_url":"https://api.github.com/users/vokal-isaac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vokal-isaac/subscriptions","organizations_url":"https://api.github.com/users/vokal-isaac/orgs","repos_url":"https://api.github.com/users/vokal-isaac/repos","events_url":"https://api.github.com/users/vokal-isaac/events{/privacy}","received_events_url":"https://api.github.com/users/vokal-isaac/received_events","type":"User","site_admin":false},"body":"I think I've got a working implementation here.  There's still stuff to be done (better error handling; a mechanism to wipe access keys from a user; a mechanism to completely remove the `s3same`-created IAM entities), but this is good enough (MVP).\r\n\r\nI've never actually made a Python package before, so I may well have made a mess of it.\r\n\r\n@brockboland @chillpop @bryanluby @projectweekend @foresmac @WorkHorseIndustries @adambain-vokal @Tuss4 @vhoof Who wants to critique my attempt at Python and/or AWS?","created_at":"2016-02-26T01:46:26Z","updated_at":"2016-02-26T11:36:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c3c6e3303a2191ef3c31bedea4b1dfc06b46e2e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vokal/s3same/pulls/1/commits","review_comments_url":"https://api.github.com/repos/vokal/s3same/pulls/1/comments","review_comment_url":"https://api.github.com/repos/vokal/s3same/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vokal/s3same/issues/1/comments","statuses_url":"https://api.github.com/repos/vokal/s3same/statuses/79f6c32cc43a51dc69670fa6e3894ee36829d9dc","head":{"label":"vokal-isaac:master","ref":"master","sha":"79f6c32cc43a51dc69670fa6e3894ee36829d9dc","user":{"login":"vokal-isaac","id":7505072,"avatar_url":"https://avatars.githubusercontent.com/u/7505072?v=3","gravatar_id":"","url":"https://api.github.com/users/vokal-isaac","html_url":"https://github.com/vokal-isaac","followers_url":"https://api.github.com/users/vokal-isaac/followers","following_url":"https://api.github.com/users/vokal-isaac/following{/other_user}","gists_url":"https://api.github.com/users/vokal-isaac/gists{/gist_id}","starred_url":"https://api.github.com/users/vokal-isaac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vokal-isaac/subscriptions","organizations_url":"https://api.github.com/users/vokal-isaac/orgs","repos_url":"https://api.github.com/users/vokal-isaac/repos","events_url":"https://api.github.com/users/vokal-isaac/events{/privacy}","received_events_url":"https://api.github.com/users/vokal-isaac/received_events","type":"User","site_admin":false},"repo":{"id":52553923,"name":"s3same","full_name":"vokal-isaac/s3same","owner":{"login":"vokal-isaac","id":7505072,"avatar_url":"https://avatars.githubusercontent.com/u/7505072?v=3","gravatar_id":"","url":"https://api.github.com/users/vokal-isaac","html_url":"https://github.com/vokal-isaac","followers_url":"https://api.github.com/users/vokal-isaac/followers","following_url":"https://api.github.com/users/vokal-isaac/following{/other_user}","gists_url":"https://api.github.com/users/vokal-isaac/gists{/gist_id}","starred_url":"https://api.github.com/users/vokal-isaac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vokal-isaac/subscriptions","organizations_url":"https://api.github.com/users/vokal-isaac/orgs","repos_url":"https://api.github.com/users/vokal-isaac/repos","events_url":"https://api.github.com/users/vokal-isaac/events{/privacy}","received_events_url":"https://api.github.com/users/vokal-isaac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vokal-isaac/s3same","description":"","fork":true,"url":"https://api.github.com/repos/vokal-isaac/s3same","forks_url":"https://api.github.com/repos/vokal-isaac/s3same/forks","keys_url":"https://api.github.com/repos/vokal-isaac/s3same/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vokal-isaac/s3same/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vokal-isaac/s3same/teams","hooks_url":"https://api.github.com/repos/vokal-isaac/s3same/hooks","issue_events_url":"https://api.github.com/repos/vokal-isaac/s3same/issues/events{/number}","events_url":"https://api.github.com/repos/vokal-isaac/s3same/events","assignees_url":"https://api.github.com/repos/vokal-isaac/s3same/assignees{/user}","branches_url":"https://api.github.com/repos/vokal-isaac/s3same/branches{/branch}","tags_url":"https://api.github.com/repos/vokal-isaac/s3same/tags","blobs_url":"https://api.github.com/repos/vokal-isaac/s3same/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vokal-isaac/s3same/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vokal-isaac/s3same/git/refs{/sha}","trees_url":"https://api.github.com/repos/vokal-isaac/s3same/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vokal-isaac/s3same/statuses/{sha}","languages_url":"https://api.github.com/repos/vokal-isaac/s3same/languages","stargazers_url":"https://api.github.com/repos/vokal-isaac/s3same/stargazers","contributors_url":"https://api.github.com/repos/vokal-isaac/s3same/contributors","subscribers_url":"https://api.github.com/repos/vokal-isaac/s3same/subscribers","subscription_url":"https://api.github.com/repos/vokal-isaac/s3same/subscription","commits_url":"https://api.github.com/repos/vokal-isaac/s3same/commits{/sha}","git_commits_url":"https://api.github.com/repos/vokal-isaac/s3same/git/commits{/sha}","comments_url":"https://api.github.com/repos/vokal-isaac/s3same/comments{/number}","issue_comment_url":"https://api.github.com/repos/vokal-isaac/s3same/issues/comments{/number}","contents_url":"https://api.github.com/repos/vokal-isaac/s3same/contents/{+path}","compare_url":"https://api.github.com/repos/vokal-isaac/s3same/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vokal-isaac/s3same/merges","archive_url":"https://api.github.com/repos/vokal-isaac/s3same/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vokal-isaac/s3same/downloads","issues_url":"https://api.github.com/repos/vokal-isaac/s3same/issues{/number}","pulls_url":"https://api.github.com/repos/vokal-isaac/s3same/pulls{/number}","milestones_url":"https://api.github.com/repos/vokal-isaac/s3same/milestones{/number}","notifications_url":"https://api.github.com/repos/vokal-isaac/s3same/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vokal-isaac/s3same/labels{/name}","releases_url":"https://api.github.com/repos/vokal-isaac/s3same/releases{/id}","deployments_url":"https://api.github.com/repos/vokal-isaac/s3same/deployments","created_at":"2016-02-25T20:17:26Z","updated_at":"2016-02-26T01:40:09Z","pushed_at":"2016-02-26T06:13:58Z","git_url":"git://github.com/vokal-isaac/s3same.git","ssh_url":"git@github.com:vokal-isaac/s3same.git","clone_url":"https://github.com/vokal-isaac/s3same.git","svn_url":"https://github.com/vokal-isaac/s3same","homepage":null,"size":6,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"vokal:master","ref":"master","sha":"3be0121ac67e4a7a35ec8f57b5401f939b363224","user":{"login":"vokal","id":375026,"avatar_url":"https://avatars.githubusercontent.com/u/375026?v=3","gravatar_id":"","url":"https://api.github.com/users/vokal","html_url":"https://github.com/vokal","followers_url":"https://api.github.com/users/vokal/followers","following_url":"https://api.github.com/users/vokal/following{/other_user}","gists_url":"https://api.github.com/users/vokal/gists{/gist_id}","starred_url":"https://api.github.com/users/vokal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vokal/subscriptions","organizations_url":"https://api.github.com/users/vokal/orgs","repos_url":"https://api.github.com/users/vokal/repos","events_url":"https://api.github.com/users/vokal/events{/privacy}","received_events_url":"https://api.github.com/users/vokal/received_events","type":"Organization","site_admin":false},"repo":{"id":52553849,"name":"s3same","full_name":"vokal/s3same","owner":{"login":"vokal","id":375026,"avatar_url":"https://avatars.githubusercontent.com/u/375026?v=3","gravatar_id":"","url":"https://api.github.com/users/vokal","html_url":"https://github.com/vokal","followers_url":"https://api.github.com/users/vokal/followers","following_url":"https://api.github.com/users/vokal/following{/other_user}","gists_url":"https://api.github.com/users/vokal/gists{/gist_id}","starred_url":"https://api.github.com/users/vokal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vokal/subscriptions","organizations_url":"https://api.github.com/users/vokal/orgs","repos_url":"https://api.github.com/users/vokal/repos","events_url":"https://api.github.com/users/vokal/events{/privacy}","received_events_url":"https://api.github.com/users/vokal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vokal/s3same","description":"","fork":false,"url":"https://api.github.com/repos/vokal/s3same","forks_url":"https://api.github.com/repos/vokal/s3same/forks","keys_url":"https://api.github.com/repos/vokal/s3same/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vokal/s3same/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vokal/s3same/teams","hooks_url":"https://api.github.com/repos/vokal/s3same/hooks","issue_events_url":"https://api.github.com/repos/vokal/s3same/issues/events{/number}","events_url":"https://api.github.com/repos/vokal/s3same/events","assignees_url":"https://api.github.com/repos/vokal/s3same/assignees{/user}","branches_url":"https://api.github.com/repos/vokal/s3same/branches{/branch}","tags_url":"https://api.github.com/repos/vokal/s3same/tags","blobs_url":"https://api.github.com/repos/vokal/s3same/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vokal/s3same/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vokal/s3same/git/refs{/sha}","trees_url":"https://api.github.com/repos/vokal/s3same/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vokal/s3same/statuses/{sha}","languages_url":"https://api.github.com/repos/vokal/s3same/languages","stargazers_url":"https://api.github.com/repos/vokal/s3same/stargazers","contributors_url":"https://api.github.com/repos/vokal/s3same/contributors","subscribers_url":"https://api.github.com/repos/vokal/s3same/subscribers","subscription_url":"https://api.github.com/repos/vokal/s3same/subscription","commits_url":"https://api.github.com/repos/vokal/s3same/commits{/sha}","git_commits_url":"https://api.github.com/repos/vokal/s3same/git/commits{/sha}","comments_url":"https://api.github.com/repos/vokal/s3same/comments{/number}","issue_comment_url":"https://api.github.com/repos/vokal/s3same/issues/comments{/number}","contents_url":"https://api.github.com/repos/vokal/s3same/contents/{+path}","compare_url":"https://api.github.com/repos/vokal/s3same/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vokal/s3same/merges","archive_url":"https://api.github.com/repos/vokal/s3same/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vokal/s3same/downloads","issues_url":"https://api.github.com/repos/vokal/s3same/issues{/number}","pulls_url":"https://api.github.com/repos/vokal/s3same/pulls{/number}","milestones_url":"https://api.github.com/repos/vokal/s3same/milestones{/number}","notifications_url":"https://api.github.com/repos/vokal/s3same/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vokal/s3same/labels{/name}","releases_url":"https://api.github.com/repos/vokal/s3same/releases{/id}","deployments_url":"https://api.github.com/repos/vokal/s3same/deployments","created_at":"2016-02-25T20:16:05Z","updated_at":"2016-02-25T20:16:05Z","pushed_at":"2016-02-26T06:13:59Z","git_url":"git://github.com/vokal/s3same.git","ssh_url":"git@github.com:vokal/s3same.git","clone_url":"https://github.com/vokal/s3same.git","svn_url":"https://github.com/vokal/s3same","homepage":null,"size":1,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vokal/s3same/pulls/1"},"html":{"href":"https://github.com/vokal/s3same/pull/1"},"issue":{"href":"https://api.github.com/repos/vokal/s3same/issues/1"},"comments":{"href":"https://api.github.com/repos/vokal/s3same/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/vokal/s3same/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/vokal/s3same/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vokal/s3same/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/vokal/s3same/statuses/79f6c32cc43a51dc69670fa6e3894ee36829d9dc"}}}}