{"action":"created","comment":{"url":"https://api.github.com/repos/mapbox/lambda-cfn/pulls/comments/91820581","pull_request_review_id":12334058,"id":91820581,"diff_hunk":"@@ -385,7 +385,11 @@ function lambda(options) {\n     var validRuntimes = ['nodejs','nodejs4.3'];\n     if (validRuntimes.indexOf(options.runtime) === -1 ) {\n       throw new Error('Invalid AWS Lambda node.js runtime ' + options.runtime);\n+    } else {\n+      fn.Properties.Runtime = options.runtime;\n     }\n+  } else {\n+    fn.Properties.Runtime = 'nodejs4.3';","path":"lib/lambda-cfn.js","position":null,"original_position":8,"commit_id":"495c0d5cf94eed9f9efe4844fe21c5768639e5e3","original_commit_id":"495c0d5cf94eed9f9efe4844fe21c5768639e5e3","user":{"login":"pauljlucas","id":2441666,"avatar_url":"https://avatars.githubusercontent.com/u/2441666?v=3","gravatar_id":"","url":"https://api.github.com/users/pauljlucas","html_url":"https://github.com/pauljlucas","followers_url":"https://api.github.com/users/pauljlucas/followers","following_url":"https://api.github.com/users/pauljlucas/following{/other_user}","gists_url":"https://api.github.com/users/pauljlucas/gists{/gist_id}","starred_url":"https://api.github.com/users/pauljlucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pauljlucas/subscriptions","organizations_url":"https://api.github.com/users/pauljlucas/orgs","repos_url":"https://api.github.com/users/pauljlucas/repos","events_url":"https://api.github.com/users/pauljlucas/events{/privacy}","received_events_url":"https://api.github.com/users/pauljlucas/received_events","type":"User","site_admin":false},"body":"It may be worth moving the validRuntimes array + string for 'nodejs4.3' up as global variables with an explicit name like AWS_Default_Version for reuse/ ease of changing in the future\r\n","created_at":"2016-12-10T00:25:07Z","updated_at":"2016-12-10T00:31:22Z","html_url":"https://github.com/mapbox/lambda-cfn/pull/41#discussion_r91820581","pull_request_url":"https://api.github.com/repos/mapbox/lambda-cfn/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/mapbox/lambda-cfn/pulls/comments/91820581"},"html":{"href":"https://github.com/mapbox/lambda-cfn/pull/41#discussion_r91820581"},"pull_request":{"href":"https://api.github.com/repos/mapbox/lambda-cfn/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/mapbox/lambda-cfn/pulls/41","id":97217668,"html_url":"https://github.com/mapbox/lambda-cfn/pull/41","diff_url":"https://github.com/mapbox/lambda-cfn/pull/41.diff","patch_url":"https://github.com/mapbox/lambda-cfn/pull/41.patch","issue_url":"https://api.github.com/repos/mapbox/lambda-cfn/issues/41","number":41,"state":"open","locked":false,"title":"[WIP] Configurable node.js runtime environment","user":{"login":"alulsh","id":10409657,"avatar_url":"https://avatars.githubusercontent.com/u/10409657?v=3","gravatar_id":"","url":"https://api.github.com/users/alulsh","html_url":"https://github.com/alulsh","followers_url":"https://api.github.com/users/alulsh/followers","following_url":"https://api.github.com/users/alulsh/following{/other_user}","gists_url":"https://api.github.com/users/alulsh/gists{/gist_id}","starred_url":"https://api.github.com/users/alulsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alulsh/subscriptions","organizations_url":"https://api.github.com/users/alulsh/orgs","repos_url":"https://api.github.com/users/alulsh/repos","events_url":"https://api.github.com/users/alulsh/events{/privacy}","received_events_url":"https://api.github.com/users/alulsh/received_events","type":"User","site_admin":false},"body":"Per discussion in https://github.com/mapbox/lambda-cfn/issues/27#issuecomment-265822498, makes it possible for a user to configure the Node.js runtime environment via `module.exports.config`, rather than hard code this value to `nodejs` or `nodejs4.3`.\r\n\r\nExample usage:\r\n\r\n```js\r\nmodule.exports.config = {\r\n    name: 'myLambdaFunction',\r\n    runtime: 'nodejs4.3',\r\n    sourcePath: 'lib/myLambdaFunction.js',\r\n    timeout: 300,\r\n    <rest of code here>\r\n}\r\n```\r\n\r\n/cc @ianshward @zmully ","created_at":"2016-12-08T22:56:39Z","updated_at":"2016-12-10T00:31:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"782984cbb683de8c1c9e270cd5b57434b70e7e85","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapbox/lambda-cfn/pulls/41/commits","review_comments_url":"https://api.github.com/repos/mapbox/lambda-cfn/pulls/41/comments","review_comment_url":"https://api.github.com/repos/mapbox/lambda-cfn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapbox/lambda-cfn/issues/41/comments","statuses_url":"https://api.github.com/repos/mapbox/lambda-cfn/statuses/495c0d5cf94eed9f9efe4844fe21c5768639e5e3","head":{"label":"mapbox:configurable-runtime","ref":"configurable-runtime","sha":"495c0d5cf94eed9f9efe4844fe21c5768639e5e3","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":53689291,"name":"lambda-cfn","full_name":"mapbox/lambda-cfn","owner":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapbox/lambda-cfn","description":"Quickly define Lambda functions and supporting resources via a javascript CloudFormation template.","fork":false,"url":"https://api.github.com/repos/mapbox/lambda-cfn","forks_url":"https://api.github.com/repos/mapbox/lambda-cfn/forks","keys_url":"https://api.github.com/repos/mapbox/lambda-cfn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/lambda-cfn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/lambda-cfn/teams","hooks_url":"https://api.github.com/repos/mapbox/lambda-cfn/hooks","issue_events_url":"https://api.github.com/repos/mapbox/lambda-cfn/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/lambda-cfn/events","assignees_url":"https://api.github.com/repos/mapbox/lambda-cfn/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/lambda-cfn/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/lambda-cfn/tags","blobs_url":"https://api.github.com/repos/mapbox/lambda-cfn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/lambda-cfn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/lambda-cfn/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/lambda-cfn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/lambda-cfn/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/lambda-cfn/languages","stargazers_url":"https://api.github.com/repos/mapbox/lambda-cfn/stargazers","contributors_url":"https://api.github.com/repos/mapbox/lambda-cfn/contributors","subscribers_url":"https://api.github.com/repos/mapbox/lambda-cfn/subscribers","subscription_url":"https://api.github.com/repos/mapbox/lambda-cfn/subscription","commits_url":"https://api.github.com/repos/mapbox/lambda-cfn/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/lambda-cfn/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/lambda-cfn/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/lambda-cfn/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/lambda-cfn/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/lambda-cfn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/lambda-cfn/merges","archive_url":"https://api.github.com/repos/mapbox/lambda-cfn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/lambda-cfn/downloads","issues_url":"https://api.github.com/repos/mapbox/lambda-cfn/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/lambda-cfn/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/lambda-cfn/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/lambda-cfn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/lambda-cfn/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/lambda-cfn/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/lambda-cfn/deployments","created_at":"2016-03-11T18:46:37Z","updated_at":"2016-08-23T15:25:02Z","pushed_at":"2016-12-10T00:18:08Z","git_url":"git://github.com/mapbox/lambda-cfn.git","ssh_url":"git@github.com:mapbox/lambda-cfn.git","clone_url":"https://github.com/mapbox/lambda-cfn.git","svn_url":"https://github.com/mapbox/lambda-cfn","homepage":"","size":98,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":10,"default_branch":"master"}},"base":{"label":"mapbox:master","ref":"master","sha":"2dc4d70924fa50cf2369705aee7b4c4b75ddfcc6","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":53689291,"name":"lambda-cfn","full_name":"mapbox/lambda-cfn","owner":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapbox/lambda-cfn","description":"Quickly define Lambda functions and supporting resources via a javascript CloudFormation template.","fork":false,"url":"https://api.github.com/repos/mapbox/lambda-cfn","forks_url":"https://api.github.com/repos/mapbox/lambda-cfn/forks","keys_url":"https://api.github.com/repos/mapbox/lambda-cfn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/lambda-cfn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/lambda-cfn/teams","hooks_url":"https://api.github.com/repos/mapbox/lambda-cfn/hooks","issue_events_url":"https://api.github.com/repos/mapbox/lambda-cfn/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/lambda-cfn/events","assignees_url":"https://api.github.com/repos/mapbox/lambda-cfn/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/lambda-cfn/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/lambda-cfn/tags","blobs_url":"https://api.github.com/repos/mapbox/lambda-cfn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/lambda-cfn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/lambda-cfn/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/lambda-cfn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/lambda-cfn/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/lambda-cfn/languages","stargazers_url":"https://api.github.com/repos/mapbox/lambda-cfn/stargazers","contributors_url":"https://api.github.com/repos/mapbox/lambda-cfn/contributors","subscribers_url":"https://api.github.com/repos/mapbox/lambda-cfn/subscribers","subscription_url":"https://api.github.com/repos/mapbox/lambda-cfn/subscription","commits_url":"https://api.github.com/repos/mapbox/lambda-cfn/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/lambda-cfn/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/lambda-cfn/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/lambda-cfn/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/lambda-cfn/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/lambda-cfn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/lambda-cfn/merges","archive_url":"https://api.github.com/repos/mapbox/lambda-cfn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/lambda-cfn/downloads","issues_url":"https://api.github.com/repos/mapbox/lambda-cfn/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/lambda-cfn/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/lambda-cfn/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/lambda-cfn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/lambda-cfn/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/lambda-cfn/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/lambda-cfn/deployments","created_at":"2016-03-11T18:46:37Z","updated_at":"2016-08-23T15:25:02Z","pushed_at":"2016-12-10T00:18:08Z","git_url":"git://github.com/mapbox/lambda-cfn.git","ssh_url":"git@github.com:mapbox/lambda-cfn.git","clone_url":"https://github.com/mapbox/lambda-cfn.git","svn_url":"https://github.com/mapbox/lambda-cfn","homepage":"","size":98,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapbox/lambda-cfn/pulls/41"},"html":{"href":"https://github.com/mapbox/lambda-cfn/pull/41"},"issue":{"href":"https://api.github.com/repos/mapbox/lambda-cfn/issues/41"},"comments":{"href":"https://api.github.com/repos/mapbox/lambda-cfn/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/mapbox/lambda-cfn/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/mapbox/lambda-cfn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapbox/lambda-cfn/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/mapbox/lambda-cfn/statuses/495c0d5cf94eed9f9efe4844fe21c5768639e5e3"}}}}
{"actor":{"display_login":"pauljlucas"}}