{"action":"opened","number":136,"pull_request":{"url":"https://api.github.com/repos/rackerlabs/lambda-uploader/pulls/136","id":112138930,"html_url":"https://github.com/rackerlabs/lambda-uploader/pull/136","diff_url":"https://github.com/rackerlabs/lambda-uploader/pull/136.diff","patch_url":"https://github.com/rackerlabs/lambda-uploader/pull/136.patch","issue_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/issues/136","number":136,"state":"open","locked":false,"title":"Add functionality for Kinesis subscriptions","user":{"login":"dsouzajude","id":824203,"avatar_url":"https://avatars1.githubusercontent.com/u/824203?v=3","gravatar_id":"","url":"https://api.github.com/users/dsouzajude","html_url":"https://github.com/dsouzajude","followers_url":"https://api.github.com/users/dsouzajude/followers","following_url":"https://api.github.com/users/dsouzajude/following{/other_user}","gists_url":"https://api.github.com/users/dsouzajude/gists{/gist_id}","starred_url":"https://api.github.com/users/dsouzajude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsouzajude/subscriptions","organizations_url":"https://api.github.com/users/dsouzajude/orgs","repos_url":"https://api.github.com/users/dsouzajude/repos","events_url":"https://api.github.com/users/dsouzajude/events{/privacy}","received_events_url":"https://api.github.com/users/dsouzajude/received_events","type":"User","site_admin":false},"body":"This PR adds functionality for the lambda to subscribe to a Kinesis stream. The configuration is defined in the field `subscription` as follows:\r\n\r\n```json\r\n{\r\n  \"name\": \"myFunc\",\r\n  \"description\": \"myfunc\",\r\n  \"region\": \"us-east-1\",\r\n  \"handler\": \"function.lambda_handler\",\r\n  \"role\": \"arn:aws:iam::00000000000:role/lambda_basic_execution\",\r\n  \"requirements\": [\"Jinja2==2.8\"],\r\n  \"ignore\": [\r\n    \"circle.yml\",\r\n    \".git\",\r\n    \"/*.pyc\"\r\n  ],\r\n  \"timeout\": 30,\r\n  \"memory\": 512,\r\n  \"subscription\": {\r\n    \"kinesis\": {\r\n      \"stream\": \"arn:aws:kinesis:eu-west-1:000000000000:stream/services\",\r\n      \"batch_size\": 10\r\n    }\r\n  },\r\n  \"vpc\": {\r\n    \"subnets\": [\r\n      \"subnet-00000000\"\r\n    ],\r\n    \"security_groups\": [\r\n      \"sg-00000000\"\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\nIt also allows for the possibility to add other kinds of subscriptions, for example AWS SNS.\r\n\r\n\r\n**My use-case:**\r\n\r\nI'd like my lambda to process logs from a Kinesis stream, transform it into events that can be sent to Riemann for monitoring purposes. Therefore, after creating and uploading the lambda function, I need it to subscribe onto the stream to receive incoming data and process them.","created_at":"2017-03-23T00:20:10Z","updated_at":"2017-03-23T00:20:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/pulls/136/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/pulls/136/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/issues/136/comments","statuses_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/statuses/79b7c35273e8eb3894508d422e51ac9be4fdabf8","head":{"label":"dsouzajude:kinesis-subscription","ref":"kinesis-subscription","sha":"79b7c35273e8eb3894508d422e51ac9be4fdabf8","user":{"login":"dsouzajude","id":824203,"avatar_url":"https://avatars1.githubusercontent.com/u/824203?v=3","gravatar_id":"","url":"https://api.github.com/users/dsouzajude","html_url":"https://github.com/dsouzajude","followers_url":"https://api.github.com/users/dsouzajude/followers","following_url":"https://api.github.com/users/dsouzajude/following{/other_user}","gists_url":"https://api.github.com/users/dsouzajude/gists{/gist_id}","starred_url":"https://api.github.com/users/dsouzajude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsouzajude/subscriptions","organizations_url":"https://api.github.com/users/dsouzajude/orgs","repos_url":"https://api.github.com/users/dsouzajude/repos","events_url":"https://api.github.com/users/dsouzajude/events{/privacy}","received_events_url":"https://api.github.com/users/dsouzajude/received_events","type":"User","site_admin":false},"repo":{"id":85875609,"name":"lambda-uploader","full_name":"dsouzajude/lambda-uploader","owner":{"login":"dsouzajude","id":824203,"avatar_url":"https://avatars1.githubusercontent.com/u/824203?v=3","gravatar_id":"","url":"https://api.github.com/users/dsouzajude","html_url":"https://github.com/dsouzajude","followers_url":"https://api.github.com/users/dsouzajude/followers","following_url":"https://api.github.com/users/dsouzajude/following{/other_user}","gists_url":"https://api.github.com/users/dsouzajude/gists{/gist_id}","starred_url":"https://api.github.com/users/dsouzajude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsouzajude/subscriptions","organizations_url":"https://api.github.com/users/dsouzajude/orgs","repos_url":"https://api.github.com/users/dsouzajude/repos","events_url":"https://api.github.com/users/dsouzajude/events{/privacy}","received_events_url":"https://api.github.com/users/dsouzajude/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dsouzajude/lambda-uploader","description":"Helps package and upload Python lambda functions to AWS","fork":true,"url":"https://api.github.com/repos/dsouzajude/lambda-uploader","forks_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/forks","keys_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/teams","hooks_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/hooks","issue_events_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/issues/events{/number}","events_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/events","assignees_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/assignees{/user}","branches_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/branches{/branch}","tags_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/tags","blobs_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/git/refs{/sha}","trees_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/statuses/{sha}","languages_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/languages","stargazers_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/stargazers","contributors_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/contributors","subscribers_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/subscribers","subscription_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/subscription","commits_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/commits{/sha}","git_commits_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/git/commits{/sha}","comments_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/comments{/number}","issue_comment_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/issues/comments{/number}","contents_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/contents/{+path}","compare_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/merges","archive_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/downloads","issues_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/issues{/number}","pulls_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/pulls{/number}","milestones_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/milestones{/number}","notifications_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/labels{/name}","releases_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/releases{/id}","deployments_url":"https://api.github.com/repos/dsouzajude/lambda-uploader/deployments","created_at":"2017-03-22T20:59:46Z","updated_at":"2017-03-22T20:59:48Z","pushed_at":"2017-03-23T00:19:09Z","git_url":"git://github.com/dsouzajude/lambda-uploader.git","ssh_url":"git@github.com:dsouzajude/lambda-uploader.git","clone_url":"https://github.com/dsouzajude/lambda-uploader.git","svn_url":"https://github.com/dsouzajude/lambda-uploader","homepage":"","size":154,"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":"rackerlabs:master","ref":"master","sha":"1909ec81c5a63f516d43b33a877a0aa7725d50c7","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars2.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":44770397,"name":"lambda-uploader","full_name":"rackerlabs/lambda-uploader","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars2.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/lambda-uploader","description":"Helps package and upload Python lambda functions to AWS","fork":false,"url":"https://api.github.com/repos/rackerlabs/lambda-uploader","forks_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/forks","keys_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/teams","hooks_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/events","assignees_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/tags","blobs_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/subscription","commits_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/merges","archive_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/downloads","issues_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/releases{/id}","deployments_url":"https://api.github.com/repos/rackerlabs/lambda-uploader/deployments","created_at":"2015-10-22T20:08:58Z","updated_at":"2017-03-16T01:37:15Z","pushed_at":"2017-03-21T01:20:09Z","git_url":"git://github.com/rackerlabs/lambda-uploader.git","ssh_url":"git@github.com:rackerlabs/lambda-uploader.git","clone_url":"https://github.com/rackerlabs/lambda-uploader.git","svn_url":"https://github.com/rackerlabs/lambda-uploader","homepage":"","size":149,"stargazers_count":165,"watchers_count":165,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":22,"forks":39,"open_issues":22,"watchers":165,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/lambda-uploader/pulls/136"},"html":{"href":"https://github.com/rackerlabs/lambda-uploader/pull/136"},"issue":{"href":"https://api.github.com/repos/rackerlabs/lambda-uploader/issues/136"},"comments":{"href":"https://api.github.com/repos/rackerlabs/lambda-uploader/issues/136/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/lambda-uploader/pulls/136/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/lambda-uploader/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/lambda-uploader/pulls/136/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/lambda-uploader/statuses/79b7c35273e8eb3894508d422e51ac9be4fdabf8"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":151,"deletions":2,"changed_files":6}}
{"actor":{"display_login":"dsouzajude"}}