{"action":"created","comment":{"url":"https://api.github.com/repos/awslabs/chalice/pulls/comments/123107326","pull_request_review_id":45276403,"id":123107326,"diff_hunk":"@@ -475,6 +491,75 @@ def test_can_provide_tags(self, stubbed_session):\n             handler='app.app') == 'arn:12345:name'\n         stubbed_session.verify_stubs()\n \n+    def test_raises_large_deployment_error_for_connection_error(\n+            self, mock_lambda_client):\n+        mock_session = mock.Mock(botocore.session.Session)","path":"tests/functional/test_awsclient.py","position":73,"original_position":73,"commit_id":"b620d4ef83898779f3599825a2c7553f600ecd11","original_commit_id":"b620d4ef83898779f3599825a2c7553f600ecd11","user":{"login":"jamesls","id":368057,"avatar_url":"https://avatars3.githubusercontent.com/u/368057?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesls","html_url":"https://github.com/jamesls","followers_url":"https://api.github.com/users/jamesls/followers","following_url":"https://api.github.com/users/jamesls/following{/other_user}","gists_url":"https://api.github.com/users/jamesls/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesls/subscriptions","organizations_url":"https://api.github.com/users/jamesls/orgs","repos_url":"https://api.github.com/users/jamesls/repos","events_url":"https://api.github.com/users/jamesls/events{/privacy}","received_events_url":"https://api.github.com/users/jamesls/received_events","type":"User","site_admin":false},"body":"Why are we doing this?? There's an existing way to test this, which is using the StubbedSession.\r\n\r\nIf the necessary abstractions aren't in place in StubbedSession, I think it's more appropriate it to add them rather than work around them bypassing the StubbedSession and dropping down to botocore sessions directly.","created_at":"2017-06-20T21:59:25Z","updated_at":"2017-06-20T22:02:13Z","html_url":"https://github.com/awslabs/chalice/pull/380#discussion_r123107326","pull_request_url":"https://api.github.com/repos/awslabs/chalice/pulls/380","_links":{"self":{"href":"https://api.github.com/repos/awslabs/chalice/pulls/comments/123107326"},"html":{"href":"https://github.com/awslabs/chalice/pull/380#discussion_r123107326"},"pull_request":{"href":"https://api.github.com/repos/awslabs/chalice/pulls/380"}}},"pull_request":{"url":"https://api.github.com/repos/awslabs/chalice/pulls/380","id":125703106,"html_url":"https://github.com/awslabs/chalice/pull/380","diff_url":"https://github.com/awslabs/chalice/pull/380.diff","patch_url":"https://github.com/awslabs/chalice/pull/380.patch","issue_url":"https://api.github.com/repos/awslabs/chalice/issues/380","number":380,"state":"open","locked":false,"title":"Add better errors for too large deployments","user":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars3.githubusercontent.com/u/4605355?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"body":"The better errors consistent of:\r\n* Detecting errors that were likely because of chalice applications\r\n  that were too large.\r\n* Indicating that it occurred during the lambda deployment phase\r\n* Indicating suggestions on how to fix it\r\n\r\nIn addition, added a unified ChaliceDeploymentError that can be\r\nused to improve the error message when deploying a chalice\r\napplication for future enhancements.\r\n\r\nFixes https://github.com/awslabs/chalice/issues/246\r\n\r\nHere are some examples for the error messages:\r\n1) Connection getting aborted as chalice is sending data while Lambda cuts off the connection.\r\n```\r\nDEPLOYMENT ERROR - While sending your chalice handler code to Lambda, received the following error: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe')). This is likely because the deployment package is 58.2 MB. Lambda only allows deployment packages that are 50.0 MB or less in size. To avoid this error, decrease the size of your chalice application by removing code or removing dependencies from your chalice application.\r\n```\r\n2) Lambda returns an error saying the zipped deployment package is too large.\r\n```\r\nDEPLOYMENT ERROR - While sending your chalice handler code to Lambda, received the following error: An error occurred (RequestEntityTooLargeException) when calling the CreateFunction operation: Request must be smaller than 69905067 bytes for the CreateFunction operation. To avoid this error, decrease the size of your chalice application by removing code or removing dependencies from your chalice application.\r\n```\r\n3) Lambda returns an error saying the contents of the unzipped deployment package is too large.\r\n```\r\nDEPLOYMENT ERROR - While sending your chalice handler code to Lambda, received the following error: An error occurred (InvalidParameterValueException) when calling the CreateFunction operation: Unzipped size must be smaller than 262144000 bytes. To avoid this error, decrease the size of your chalice application by removing code or removing dependencies from your chalice application.\r\n```","created_at":"2017-06-14T22:05:32Z","updated_at":"2017-06-20T22:02:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"77be52b1281b72f28049e4e8a7b3f5c14a6f6556","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/awslabs/chalice/pulls/380/commits","review_comments_url":"https://api.github.com/repos/awslabs/chalice/pulls/380/comments","review_comment_url":"https://api.github.com/repos/awslabs/chalice/pulls/comments{/number}","comments_url":"https://api.github.com/repos/awslabs/chalice/issues/380/comments","statuses_url":"https://api.github.com/repos/awslabs/chalice/statuses/b620d4ef83898779f3599825a2c7553f600ecd11","head":{"label":"kyleknap:deploy-err-msg","ref":"deploy-err-msg","sha":"b620d4ef83898779f3599825a2c7553f600ecd11","user":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars3.githubusercontent.com/u/4605355?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"repo":{"id":91407196,"name":"chalice","full_name":"kyleknap/chalice","owner":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars3.githubusercontent.com/u/4605355?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kyleknap/chalice","description":"Python Serverless Microframework for AWS","fork":true,"url":"https://api.github.com/repos/kyleknap/chalice","forks_url":"https://api.github.com/repos/kyleknap/chalice/forks","keys_url":"https://api.github.com/repos/kyleknap/chalice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kyleknap/chalice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kyleknap/chalice/teams","hooks_url":"https://api.github.com/repos/kyleknap/chalice/hooks","issue_events_url":"https://api.github.com/repos/kyleknap/chalice/issues/events{/number}","events_url":"https://api.github.com/repos/kyleknap/chalice/events","assignees_url":"https://api.github.com/repos/kyleknap/chalice/assignees{/user}","branches_url":"https://api.github.com/repos/kyleknap/chalice/branches{/branch}","tags_url":"https://api.github.com/repos/kyleknap/chalice/tags","blobs_url":"https://api.github.com/repos/kyleknap/chalice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kyleknap/chalice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kyleknap/chalice/git/refs{/sha}","trees_url":"https://api.github.com/repos/kyleknap/chalice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kyleknap/chalice/statuses/{sha}","languages_url":"https://api.github.com/repos/kyleknap/chalice/languages","stargazers_url":"https://api.github.com/repos/kyleknap/chalice/stargazers","contributors_url":"https://api.github.com/repos/kyleknap/chalice/contributors","subscribers_url":"https://api.github.com/repos/kyleknap/chalice/subscribers","subscription_url":"https://api.github.com/repos/kyleknap/chalice/subscription","commits_url":"https://api.github.com/repos/kyleknap/chalice/commits{/sha}","git_commits_url":"https://api.github.com/repos/kyleknap/chalice/git/commits{/sha}","comments_url":"https://api.github.com/repos/kyleknap/chalice/comments{/number}","issue_comment_url":"https://api.github.com/repos/kyleknap/chalice/issues/comments{/number}","contents_url":"https://api.github.com/repos/kyleknap/chalice/contents/{+path}","compare_url":"https://api.github.com/repos/kyleknap/chalice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kyleknap/chalice/merges","archive_url":"https://api.github.com/repos/kyleknap/chalice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kyleknap/chalice/downloads","issues_url":"https://api.github.com/repos/kyleknap/chalice/issues{/number}","pulls_url":"https://api.github.com/repos/kyleknap/chalice/pulls{/number}","milestones_url":"https://api.github.com/repos/kyleknap/chalice/milestones{/number}","notifications_url":"https://api.github.com/repos/kyleknap/chalice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kyleknap/chalice/labels{/name}","releases_url":"https://api.github.com/repos/kyleknap/chalice/releases{/id}","deployments_url":"https://api.github.com/repos/kyleknap/chalice/deployments","created_at":"2017-05-16T02:53:34Z","updated_at":"2017-05-16T02:53:36Z","pushed_at":"2017-06-20T19:59:30Z","git_url":"git://github.com/kyleknap/chalice.git","ssh_url":"git@github.com:kyleknap/chalice.git","clone_url":"https://github.com/kyleknap/chalice.git","svn_url":"https://github.com/kyleknap/chalice","homepage":"","size":826,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"awslabs:master","ref":"master","sha":"c947eb08dc81e00168de175d7bca1210efc0cbc0","user":{"login":"awslabs","id":3299148,"avatar_url":"https://avatars3.githubusercontent.com/u/3299148?v=3","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":59868262,"name":"chalice","full_name":"awslabs/chalice","owner":{"login":"awslabs","id":3299148,"avatar_url":"https://avatars3.githubusercontent.com/u/3299148?v=3","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/awslabs/chalice","description":"Python Serverless Microframework for AWS","fork":false,"url":"https://api.github.com/repos/awslabs/chalice","forks_url":"https://api.github.com/repos/awslabs/chalice/forks","keys_url":"https://api.github.com/repos/awslabs/chalice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awslabs/chalice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awslabs/chalice/teams","hooks_url":"https://api.github.com/repos/awslabs/chalice/hooks","issue_events_url":"https://api.github.com/repos/awslabs/chalice/issues/events{/number}","events_url":"https://api.github.com/repos/awslabs/chalice/events","assignees_url":"https://api.github.com/repos/awslabs/chalice/assignees{/user}","branches_url":"https://api.github.com/repos/awslabs/chalice/branches{/branch}","tags_url":"https://api.github.com/repos/awslabs/chalice/tags","blobs_url":"https://api.github.com/repos/awslabs/chalice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awslabs/chalice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awslabs/chalice/git/refs{/sha}","trees_url":"https://api.github.com/repos/awslabs/chalice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awslabs/chalice/statuses/{sha}","languages_url":"https://api.github.com/repos/awslabs/chalice/languages","stargazers_url":"https://api.github.com/repos/awslabs/chalice/stargazers","contributors_url":"https://api.github.com/repos/awslabs/chalice/contributors","subscribers_url":"https://api.github.com/repos/awslabs/chalice/subscribers","subscription_url":"https://api.github.com/repos/awslabs/chalice/subscription","commits_url":"https://api.github.com/repos/awslabs/chalice/commits{/sha}","git_commits_url":"https://api.github.com/repos/awslabs/chalice/git/commits{/sha}","comments_url":"https://api.github.com/repos/awslabs/chalice/comments{/number}","issue_comment_url":"https://api.github.com/repos/awslabs/chalice/issues/comments{/number}","contents_url":"https://api.github.com/repos/awslabs/chalice/contents/{+path}","compare_url":"https://api.github.com/repos/awslabs/chalice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awslabs/chalice/merges","archive_url":"https://api.github.com/repos/awslabs/chalice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awslabs/chalice/downloads","issues_url":"https://api.github.com/repos/awslabs/chalice/issues{/number}","pulls_url":"https://api.github.com/repos/awslabs/chalice/pulls{/number}","milestones_url":"https://api.github.com/repos/awslabs/chalice/milestones{/number}","notifications_url":"https://api.github.com/repos/awslabs/chalice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awslabs/chalice/labels{/name}","releases_url":"https://api.github.com/repos/awslabs/chalice/releases{/id}","deployments_url":"https://api.github.com/repos/awslabs/chalice/deployments","created_at":"2016-05-27T23:27:13Z","updated_at":"2017-06-20T19:49:37Z","pushed_at":"2017-06-20T19:59:31Z","git_url":"git://github.com/awslabs/chalice.git","ssh_url":"git@github.com:awslabs/chalice.git","clone_url":"https://github.com/awslabs/chalice.git","svn_url":"https://github.com/awslabs/chalice","homepage":"","size":789,"stargazers_count":2781,"watchers_count":2781,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":209,"mirror_url":null,"open_issues_count":85,"forks":209,"open_issues":85,"watchers":2781,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/awslabs/chalice/pulls/380"},"html":{"href":"https://github.com/awslabs/chalice/pull/380"},"issue":{"href":"https://api.github.com/repos/awslabs/chalice/issues/380"},"comments":{"href":"https://api.github.com/repos/awslabs/chalice/issues/380/comments"},"review_comments":{"href":"https://api.github.com/repos/awslabs/chalice/pulls/380/comments"},"review_comment":{"href":"https://api.github.com/repos/awslabs/chalice/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/awslabs/chalice/pulls/380/commits"},"statuses":{"href":"https://api.github.com/repos/awslabs/chalice/statuses/b620d4ef83898779f3599825a2c7553f600ecd11"}}}}
{"actor":{"display_login":"jamesls"}}