1189 Commits

Author SHA1 Message Date
Erik Erikson
769e347b50 Allow Custom Per-Function Roles
Resolves matter 1 of https://github.com/serverless/serverless/issues/1895

Allow each function to declare the ARN of the role that it is to execute within.  If any function has no role ARN but provider role ARN is defined then use that role for such functions.  If any function does not have a specified role (even by falling back to a provider-wide role) then add the default policy and role so that it can be used for such functions.
Break out the portions of the logic into their discrete units so that the plugin code is a readable summary.  Add comments to the discrete units.

Add tests that check that the default role and policy are not added if every function has a role.
Add tests that check that every function that has a declared role gets it assigned.
Add tests that check that every function that has no declared role but where a provider role is declared gets the provider role assigned.
2016-09-08 12:52:30 -07:00
Sander van de Graaf
db31539db0
made implementation more portable 2016-09-08 21:34:40 +02:00
Mohamed GHARSALLAH
af3da9a127 Fix typo 2016-09-08 13:35:54 +02:00
Mohamed GHARSALLAH
cb5f9d831a Update documentation 2016-09-08 13:08:43 +02:00
Mohamed GHARSALLAH
5209b69c6e Add unit tests 2016-09-08 13:08:31 +02:00
Mohamed GHARSALLAH
b9440f18b4 Add support for s3 events filter rules 2016-09-08 13:08:10 +02:00
Erik Erikson
5e5efd7774 Resolve Lint Errors
Yeesh.  Sorry for the noob moves.  Resolves lint.
Note that the reduction in coverage is a result of the reduction of lines of code via removal of those lines without removal of uncovered lines.
2016-09-07 15:39:10 -07:00
Erik Erikson
a1eabd7b41 Update Tests
Rather than expecting static strings, expect the new joins of various variables.
2016-09-07 15:13:12 -07:00
Erik Erikson
f5470c0828 Removing code-based policy name and resource assignment 2016-09-07 14:56:34 -07:00
Erik Erikson
39500714ff Merge branch 'master' into reduce-scope-of-rights-of-default-iamlambdarole 2016-09-07 13:38:53 -07:00
Sander van de Graaf
cb98671220
added parameters to method 2016-09-07 15:37:53 +02:00
Fabien Ruffin
2f296c296f Fixed linting issues 2016-09-07 17:15:24 +10:00
Fabien Ruffin
a568d4f236 Updated tests for API Gateway response integration 2016-09-07 15:45:47 +10:00
Fabien Ruffin
4544bf3d89 Updated API Gateway integration to return 500 when Lambda functions time out 2016-09-07 15:36:45 +10:00
rowan
7ef598b2fa Update off master - docs changes. 2016-09-06 09:07:52 +10:00
Florian Motlik
f9f212b404 WIP 2016-09-05 16:18:58 +02:00
Florian Motlik
1364f05f61 Merge pull request #1917 from johncmckim/issue-1777
Update packaging to support individual packages per function
2016-09-05 14:56:07 +02:00
John McKim
02c0e6c369 increase coverage of artifact uploads 2016-09-05 22:37:13 +10:00
rowan
474326f4c7 Fix eslint error. 2016-09-05 15:34:56 +10:00
rowan
514d06d304 Remove .only usage. 2016-09-05 13:58:24 +10:00
rowan
7ae87ba27e Load AWS profile from provider object. 2016-09-05 13:46:40 +10:00
rowan
1ddfdf7fa8 Remove unused variable. 2016-09-03 20:51:11 +10:00
rowan
ad11a3bf5e Make tests pass by loading credentials from INI file. 2016-09-03 19:56:28 +10:00
rowan
45ef6d2a96 Update getCredentials tests to actually test correct property.
See "Using Profiles with the SDK" on
http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html.
2016-09-03 17:26:34 +10:00
Alexander Anich
8d6748b9eb Updates sinon stubbed tests in plugins/aws
Creates test cases to check for correct arugments from sinon stubs
2016-09-02 17:40:42 -10:00
John McKim
83a9d5e0fd fixes from pr comments 2016-09-03 12:32:13 +10:00
Florian Motlik
c973594ac4 Merge pull request #1998 from serverless/add-status-code-support-for-api-gateway
Add status code support for API Gateway
2016-09-02 17:28:58 +02:00
Florian Motlik
62131e3b63 Add documentation for default 500 status 2016-09-02 17:19:56 +02:00
Florian Motlik
bb2ca44623 Capture Exception in handler with 500 status code 2016-09-02 17:02:30 +02:00
Philipp Muens
41260b834e Change from object representation to string representation for status code 2016-09-02 16:01:16 +02:00
Philipp Muens
16863c3303 Fix tests to use new resource logical IDs 2016-09-02 14:20:58 +02:00
Philipp Muens
dede40ba7d Fix broken markdown syntax for table of status codes 2016-09-02 14:20:58 +02:00
Philipp Muens
09139fda18 Add status code support for API Gateway 2016-09-02 14:20:58 +02:00
Nick den Engelsman
c2d2152679 Moved monitorStack to shared lib/plugins/aws/lib 2016-09-02 13:35:29 +02:00
Nick den Engelsman
c347bf8544 Improve check if stack created and test suite 2016-09-02 13:19:07 +02:00
Nick den Engelsman
22e812c32a Make eslint happy 2016-09-02 13:19:07 +02:00
Nick den Engelsman
9d2a990364 update test description for monitorStack 2016-09-02 13:19:07 +02:00
Nick den Engelsman
7e77f8aa0c remove unnecessary eslint-disable no-console 2016-09-02 13:19:07 +02:00
Nick den Engelsman
7ed013f98d refactor monitorUpdate within lib/plugins/aws/deploy/lib/updateStack.js to keep track of initial stack error during deployment and show all stack events with --verbose 2016-09-02 13:19:07 +02:00
John McKim
ea864be300 merge with master 2016-09-02 07:17:57 +10:00
John DeVerna
12a069d2f2 Fixing #1168 - adding ability to specify APIG pass through behavior 2016-09-01 11:12:46 -04:00
John McKim
44823ebc71 merge with master 2016-09-01 07:30:17 +10:00
Eslam A. Hefnawy
6bf34263df switched back the deployment bucket name logical id 2016-09-01 01:08:34 +09:00
Eslam A. Hefnawy
9f0b6c09fa resolved conflicts and fixed tests 2016-08-31 23:34:23 +09:00
Eslam A. Hefnawy
f996b3549b fixed logical ids tests 2016-08-31 23:27:17 +09:00
Eslam A. Hefnawy
718aa3169c fixed logical id references 2016-08-31 23:27:17 +09:00
Eslam A. Hefnawy
c6f4b2e4fe fixed authorizer tests 2016-08-31 23:27:17 +09:00
Eslam A. Hefnawy
a5218fb686 fixed conflicts with master 2016-08-31 23:27:17 +09:00
Eslam A. Hefnawy
e9e565e2ec fixed cors bug 2016-08-31 23:27:17 +09:00
Eslam A. Hefnawy
ae4f094bc7 fix linting issues 2016-08-31 23:27:17 +09:00