{"action":"opened","number":3357,"pull_request":{"url":"https://api.github.com/repos/serverless/serverless/pulls/3357","id":110478398,"html_url":"https://github.com/serverless/serverless/pull/3357","diff_url":"https://github.com/serverless/serverless/pull/3357.diff","patch_url":"https://github.com/serverless/serverless/pull/3357.patch","issue_url":"https://api.github.com/repos/serverless/serverless/issues/3357","number":3357,"state":"open","locked":false,"title":"allow multiple authorizers by specifying name and arn","user":{"login":"kminkler","id":266811,"avatar_url":"https://avatars2.githubusercontent.com/u/266811?v=3","gravatar_id":"","url":"https://api.github.com/users/kminkler","html_url":"https://github.com/kminkler","followers_url":"https://api.github.com/users/kminkler/followers","following_url":"https://api.github.com/users/kminkler/following{/other_user}","gists_url":"https://api.github.com/users/kminkler/gists{/gist_id}","starred_url":"https://api.github.com/users/kminkler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kminkler/subscriptions","organizations_url":"https://api.github.com/users/kminkler/orgs","repos_url":"https://api.github.com/users/kminkler/repos","events_url":"https://api.github.com/users/kminkler/events{/privacy}","received_events_url":"https://api.github.com/users/kminkler/received_events","type":"User","site_admin":false},"body":"<!--\r\n1. Please check out and follow our Contributing Guidelines: https://github.com/serverless/serverless/blob/master/CONTRIBUTING.md\r\n2. Do not remove any section of the template. If something is not applicable leave it empty but leave it in the PR\r\n3. Please follow the template, otherwise we'll have to ask you to update it and it will take longer until your PR is merged\r\n-->\r\n\r\n## What did you implement:\r\n\r\nRan into issue specifying multiple authorizers (by arn) because the authorizer names were similar (both ended in the same -suffix)\r\n\r\nchange Allow for multiple authorizers (with similar names) to be specified by arn by allowing to name each authorizer, e.g\r\n\r\nauthorizer:\r\n   arn: arn:aws:...\r\n   name: authorizer1\r\n\r\nauthorizer:\r\n   arn: arn:aws:...\r\n   name: authorizer2\r\n\r\n<!--\r\nBriefly describe the feature if no issue exists for this PR\r\n-->\r\n\r\n## How did you implement it:\r\n\r\nCheck to see if name is specified along with arn.  if so, favor specified name over generated name.\r\n\r\n<!--\r\nIf this is a nontrivial change please briefly describe your implementation so its easy for us to understand and review your code.\r\n-->\r\n\r\n## How can we verify it:\r\n\r\nCreate two authorizer functions with similar suffixed names, e.g.  auth1-dev  and auth2-dev\r\ncreate two functions authorized by each authorizer, eg.\r\n\r\nfunctions:\r\n  function1:\r\n      handler: handler.function1\r\n      events:\r\n         - http:\r\n             path: /one\r\n             authorizer:\r\n                 arn:  arn:...:auth1-dev\r\n  function2:\r\n      handler: handler.function1\r\n      events:\r\n         - http:\r\n             path: /one\r\n             authorizer:\r\n                 arn:  arn:...:auth2-dev\r\n \r\n\r\nThe resulting template/api gateway will have only a single authorizer named 'dev' used by both functions, which is not the intended behavior.\r\n\r\nNow adding 'name' to the authorizer naming each one uniquely will result in two authorizers being created and used by the functions, as intended:\r\n\r\nfunctions:\r\n  function1:\r\n      handler: handler.function1\r\n      events:\r\n         - http:\r\n             path: /one\r\n             authorizer:\r\n                 arn:  arn:...:auth1-dev\r\n                 name: auth1\r\n  function2:\r\n      handler: handler.function1\r\n      events:\r\n         - http:\r\n             path: /one\r\n             authorizer:\r\n                 arn:  arn:...:auth2-dev\r\n                 name: auth2\r\n\r\n\r\n<!--\r\nAdd any applicable config, commands, screenshots or other resources\r\nto make it easy for us to verify this works. The easier you make it for us\r\nto review a PR, the faster we can review and merge it.\r\n\r\nExamples:\r\n* serverless.yml - Fully functioning to easily deploy changes\r\n* Screenshots - Showing the difference between your output and the master\r\n* AWS CLI commands - To list AWS resources and show that the correct config is in place\r\n* Other - Anything else that comes to mind to help us evaluate\r\n-->\r\n\r\n## Todos:\r\n\r\n- [x ] Write tests\r\n- [x ] Write documentation\r\n- [x ] Fix linting errors\r\n- [ x] Make sure code coverage hasn't dropped\r\n- [ x] Provide verification config / commands / resources\r\n- [ x] Enable \"Allow edits from maintainers\" for this PR\r\n- [ x] Update the messages below\r\n\r\n***Is this ready for review?:*** YES\r\n***Is it a breaking change?:*** NO\r\n","created_at":"2017-03-13T19:19:32Z","updated_at":"2017-03-13T19:19:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/serverless/serverless/pulls/3357/commits","review_comments_url":"https://api.github.com/repos/serverless/serverless/pulls/3357/comments","review_comment_url":"https://api.github.com/repos/serverless/serverless/pulls/comments{/number}","comments_url":"https://api.github.com/repos/serverless/serverless/issues/3357/comments","statuses_url":"https://api.github.com/repos/serverless/serverless/statuses/e0c66b07b3c19d6e5b70b1251ffb1e14721adbbc","head":{"label":"StompingGroundSites:master","ref":"master","sha":"e0c66b07b3c19d6e5b70b1251ffb1e14721adbbc","user":{"login":"StompingGroundSites","id":24828029,"avatar_url":"https://avatars3.githubusercontent.com/u/24828029?v=3","gravatar_id":"","url":"https://api.github.com/users/StompingGroundSites","html_url":"https://github.com/StompingGroundSites","followers_url":"https://api.github.com/users/StompingGroundSites/followers","following_url":"https://api.github.com/users/StompingGroundSites/following{/other_user}","gists_url":"https://api.github.com/users/StompingGroundSites/gists{/gist_id}","starred_url":"https://api.github.com/users/StompingGroundSites/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StompingGroundSites/subscriptions","organizations_url":"https://api.github.com/users/StompingGroundSites/orgs","repos_url":"https://api.github.com/users/StompingGroundSites/repos","events_url":"https://api.github.com/users/StompingGroundSites/events{/privacy}","received_events_url":"https://api.github.com/users/StompingGroundSites/received_events","type":"Organization","site_admin":false},"repo":{"id":82324246,"name":"serverless-1","full_name":"StompingGroundSites/serverless-1","owner":{"login":"StompingGroundSites","id":24828029,"avatar_url":"https://avatars3.githubusercontent.com/u/24828029?v=3","gravatar_id":"","url":"https://api.github.com/users/StompingGroundSites","html_url":"https://github.com/StompingGroundSites","followers_url":"https://api.github.com/users/StompingGroundSites/followers","following_url":"https://api.github.com/users/StompingGroundSites/following{/other_user}","gists_url":"https://api.github.com/users/StompingGroundSites/gists{/gist_id}","starred_url":"https://api.github.com/users/StompingGroundSites/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StompingGroundSites/subscriptions","organizations_url":"https://api.github.com/users/StompingGroundSites/orgs","repos_url":"https://api.github.com/users/StompingGroundSites/repos","events_url":"https://api.github.com/users/StompingGroundSites/events{/privacy}","received_events_url":"https://api.github.com/users/StompingGroundSites/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/StompingGroundSites/serverless-1","description":"Serverless Framework – Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more! – ","fork":true,"url":"https://api.github.com/repos/StompingGroundSites/serverless-1","forks_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/forks","keys_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/teams","hooks_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/hooks","issue_events_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/issues/events{/number}","events_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/events","assignees_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/assignees{/user}","branches_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/branches{/branch}","tags_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/tags","blobs_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/statuses/{sha}","languages_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/languages","stargazers_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/stargazers","contributors_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/contributors","subscribers_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/subscribers","subscription_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/subscription","commits_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/contents/{+path}","compare_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/merges","archive_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/downloads","issues_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/issues{/number}","pulls_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/pulls{/number}","milestones_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/milestones{/number}","notifications_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/labels{/name}","releases_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/releases{/id}","deployments_url":"https://api.github.com/repos/StompingGroundSites/serverless-1/deployments","created_at":"2017-02-17T18:03:39Z","updated_at":"2017-02-17T18:03:42Z","pushed_at":"2017-03-13T19:04:29Z","git_url":"git://github.com/StompingGroundSites/serverless-1.git","ssh_url":"git@github.com:StompingGroundSites/serverless-1.git","clone_url":"https://github.com/StompingGroundSites/serverless-1.git","svn_url":"https://github.com/StompingGroundSites/serverless-1","homepage":"http://www.serverless.com","size":73328,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"serverless:master","ref":"master","sha":"15948682663eb3f50fc96e0c26bb411a59b13ee1","user":{"login":"serverless","id":13742415,"avatar_url":"https://avatars3.githubusercontent.com/u/13742415?v=3","gravatar_id":"","url":"https://api.github.com/users/serverless","html_url":"https://github.com/serverless","followers_url":"https://api.github.com/users/serverless/followers","following_url":"https://api.github.com/users/serverless/following{/other_user}","gists_url":"https://api.github.com/users/serverless/gists{/gist_id}","starred_url":"https://api.github.com/users/serverless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serverless/subscriptions","organizations_url":"https://api.github.com/users/serverless/orgs","repos_url":"https://api.github.com/users/serverless/repos","events_url":"https://api.github.com/users/serverless/events{/privacy}","received_events_url":"https://api.github.com/users/serverless/received_events","type":"Organization","site_admin":false},"repo":{"id":34302698,"name":"serverless","full_name":"serverless/serverless","owner":{"login":"serverless","id":13742415,"avatar_url":"https://avatars3.githubusercontent.com/u/13742415?v=3","gravatar_id":"","url":"https://api.github.com/users/serverless","html_url":"https://github.com/serverless","followers_url":"https://api.github.com/users/serverless/followers","following_url":"https://api.github.com/users/serverless/following{/other_user}","gists_url":"https://api.github.com/users/serverless/gists{/gist_id}","starred_url":"https://api.github.com/users/serverless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serverless/subscriptions","organizations_url":"https://api.github.com/users/serverless/orgs","repos_url":"https://api.github.com/users/serverless/repos","events_url":"https://api.github.com/users/serverless/events{/privacy}","received_events_url":"https://api.github.com/users/serverless/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/serverless/serverless","description":"Serverless Framework – Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more! – ","fork":false,"url":"https://api.github.com/repos/serverless/serverless","forks_url":"https://api.github.com/repos/serverless/serverless/forks","keys_url":"https://api.github.com/repos/serverless/serverless/keys{/key_id}","collaborators_url":"https://api.github.com/repos/serverless/serverless/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/serverless/serverless/teams","hooks_url":"https://api.github.com/repos/serverless/serverless/hooks","issue_events_url":"https://api.github.com/repos/serverless/serverless/issues/events{/number}","events_url":"https://api.github.com/repos/serverless/serverless/events","assignees_url":"https://api.github.com/repos/serverless/serverless/assignees{/user}","branches_url":"https://api.github.com/repos/serverless/serverless/branches{/branch}","tags_url":"https://api.github.com/repos/serverless/serverless/tags","blobs_url":"https://api.github.com/repos/serverless/serverless/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/serverless/serverless/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/serverless/serverless/git/refs{/sha}","trees_url":"https://api.github.com/repos/serverless/serverless/git/trees{/sha}","statuses_url":"https://api.github.com/repos/serverless/serverless/statuses/{sha}","languages_url":"https://api.github.com/repos/serverless/serverless/languages","stargazers_url":"https://api.github.com/repos/serverless/serverless/stargazers","contributors_url":"https://api.github.com/repos/serverless/serverless/contributors","subscribers_url":"https://api.github.com/repos/serverless/serverless/subscribers","subscription_url":"https://api.github.com/repos/serverless/serverless/subscription","commits_url":"https://api.github.com/repos/serverless/serverless/commits{/sha}","git_commits_url":"https://api.github.com/repos/serverless/serverless/git/commits{/sha}","comments_url":"https://api.github.com/repos/serverless/serverless/comments{/number}","issue_comment_url":"https://api.github.com/repos/serverless/serverless/issues/comments{/number}","contents_url":"https://api.github.com/repos/serverless/serverless/contents/{+path}","compare_url":"https://api.github.com/repos/serverless/serverless/compare/{base}...{head}","merges_url":"https://api.github.com/repos/serverless/serverless/merges","archive_url":"https://api.github.com/repos/serverless/serverless/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/serverless/serverless/downloads","issues_url":"https://api.github.com/repos/serverless/serverless/issues{/number}","pulls_url":"https://api.github.com/repos/serverless/serverless/pulls{/number}","milestones_url":"https://api.github.com/repos/serverless/serverless/milestones{/number}","notifications_url":"https://api.github.com/repos/serverless/serverless/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/serverless/serverless/labels{/name}","releases_url":"https://api.github.com/repos/serverless/serverless/releases{/id}","deployments_url":"https://api.github.com/repos/serverless/serverless/deployments","created_at":"2015-04-21T03:48:40Z","updated_at":"2017-03-13T18:01:57Z","pushed_at":"2017-03-13T12:54:29Z","git_url":"git://github.com/serverless/serverless.git","ssh_url":"git@github.com:serverless/serverless.git","clone_url":"https://github.com/serverless/serverless.git","svn_url":"https://github.com/serverless/serverless","homepage":"http://www.serverless.com","size":73528,"stargazers_count":15141,"watchers_count":15141,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1329,"mirror_url":null,"open_issues_count":229,"forks":1329,"open_issues":229,"watchers":15141,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/serverless/serverless/pulls/3357"},"html":{"href":"https://github.com/serverless/serverless/pull/3357"},"issue":{"href":"https://api.github.com/repos/serverless/serverless/issues/3357"},"comments":{"href":"https://api.github.com/repos/serverless/serverless/issues/3357/comments"},"review_comments":{"href":"https://api.github.com/repos/serverless/serverless/pulls/3357/comments"},"review_comment":{"href":"https://api.github.com/repos/serverless/serverless/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/serverless/serverless/pulls/3357/commits"},"statuses":{"href":"https://api.github.com/repos/serverless/serverless/statuses/e0c66b07b3c19d6e5b70b1251ffb1e14721adbbc"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"kminkler"}}