201 Commits

Author SHA1 Message Date
Erik Erikson
a982989898 Collapse role & roleArn Down To role
1. Make changes
2. Change tests
3. Change Docs
2016-10-04 15:09:06 -07:00
Erik Erikson
52c95c3b25 merge changes 2016-10-04 13:02:26 -07:00
Erik Erikson
91de87243e Merge branch 'master' into add-per-function-custom-roles
# Conflicts:
#	lib/plugins/aws/deploy/compile/functions/index.js
#	lib/plugins/aws/deploy/compile/functions/tests/index.js
2016-10-04 09:45:31 -07:00
David Tanner
4d34dfde44 Merge with master.
There was a merge issue with createStack
2016-10-03 09:11:15 -06:00
Eslam λ Hefnawy
ec3182985f Merge pull request #2068 from medhoover/s3_event_rules
S3 event rules
2016-10-03 18:01:49 +07:00
Erik Erikson
df9a179bd7 Review Fixes
1. fix docs that would lead to an error for users via copy-paste
2. add tests about adding roleArn to functions given role declared on provider and/or function
3. fix bug discovered due to lack of tests
4. add test to ensure preference for function declared roleArn over provider declared roleArn
2016-09-30 11:47:33 -07:00
David Tanner
b97c7176d5 Fix issue using this.bucketName, but the bucket on the service package instead.
Also added the content-type to the json file so you can read the file in the browser.
2016-09-30 08:30:35 -06:00
Mohamed Gharsallah
c0489ad754 update tests 2016-09-30 14:42:07 +01:00
Mohamed Gharsallah
645491e63b remove not important s3 event verification 2016-09-30 14:41:59 +01:00
David Tanner
68ef4ceab7 Move CF stack configuration to one place.
The stack is now set up in one place.
The S3 bucket isn't created on create if a bucket is already specified.
Working on configurability for the developer.
There is still the possibility of failing to deploy the stack
if the iamRoleArn is set, and a deploymentBucket is specified
2016-09-28 08:27:09 -06:00
Florian Motlik
e1adf6e921 Merge pull request #2175 from serverless/fix-api-key-value-displaying-in-info-plugin
Fix api key value displaying in info plugin
2016-09-28 16:03:21 +02:00
eL0ck
4fa7457f24 fixed. Was incorrectly catching non-http events as empty http events 2016-09-28 08:49:51 +02:00
eL0ck
0f2510eac4 fixed inconsistent error message 2016-09-28 08:49:51 +02:00
eL0ck
dc0b252564 fixed merge error. Tests all passing 2016-09-28 08:49:51 +02:00
eL0ck
a1563a3a73 fix http event validation 2016-09-28 08:47:43 +02:00
Mohamed Gharsallah
9db30f620b Add unit tests 2016-09-27 21:30:55 +01:00
Mohamed Gharsallah
b69d1c0dc6 check for event prop when s3 rules prop is defined 2016-09-27 21:30:15 +01:00
Erik Erikson
e3e686044a Merge branch 'master' into add-per-function-custom-roles
# Conflicts:
#	lib/plugins/aws/deploy/compile/functions/index.js
2016-09-27 12:23:22 -07:00
Florian Motlik
d6ffe8962b Add Var at the end of path variable CF name 2016-09-26 12:39:29 +02:00
Philipp Muens
40da6be2b2 Remove dependency on API key id in outputs section 2016-09-26 10:45:03 +02:00
Philipp Muens
a5dcee1cad Add / fix tests for api key value retrieval 2016-09-26 10:45:03 +02:00
Philipp Muens
41ef1d040d Fix api key value displaying in info plugin 2016-09-26 10:45:03 +02:00
Florian Motlik
b6a39ef115 Merge pull request #2091 from craftship/support-dash-path-name
Support Dash Character for API Gateway Resource Path
2016-09-23 20:48:17 +02:00
Florian Motlik
e4846edb21 Merge pull request #2050 from fruffin/master
Fix #2049: API Gateway integration to return 500 when Lambda functions time out
2016-09-23 19:55:18 +02:00
David Tanner
d490ed413e Rename to deploymentBucket as recommended by @flomotlik 2016-09-23 08:18:33 -06:00
David Tanner
4172655c1b Cleanup linting issues 2016-09-22 09:19:58 -06:00
David Tanner
a425967654 Add a bucket to the provider for deployments.
Also prefix deployments so they can co-exist with other files
2016-09-22 05:35:29 -06:00
Florian Motlik
f732019d5b Add any to list of allowed http methods 2016-09-21 12:48:32 +02:00
Andrew McClenaghan
2cebdff5f7 Update test to just test description 2016-09-19 20:34:02 +10:00
Andrew McClenaghan
17ae7ed96f Clean up duplicate test 2016-09-17 22:23:22 +10:00
Andrew McClenaghan
39ac286e3c Add description property for lambda function 2016-09-17 22:22:19 +10:00
Erik Erikson
f4b2c60b62 Remove formatting changes made by my editor 2016-09-15 14:02:04 -07:00
Erik Erikson
34f4b5a3cc Tighten Log Rights/iamRoleARN=>role,roleArn/Add Docs
Switch from an all lambdas logging resource IAM policy to one that targets specifically and only those CloudWatch logs produces by the lambdas declared by the service.
Modify tests to ensure this is properly done.

Introduce a `role` property that specifies a role defined within the service.
Update tests to ensure this is properly used
Update documentation to describe this

Replace `iamRoleARN` with `roleArn`
Update tests and documentation to reflect this

Add Decision Trees describing the decision points and considerations between individual function rights and shared rights models
2016-09-13 17:06:00 -07:00
Jon Sharratt
493de1e310 add support for dashes as a resource path 2016-09-11 20:28:32 +01:00
Eslam A. Hefnawy
16a20a4bed updated docs and tests for api keys outputs 2016-09-09 21:26:30 +09:00
Eslam A. Hefnawy
24acaf56c9 added api keys to info plugin 2016-09-09 19:54:22 +09:00
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
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
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
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
83a9d5e0fd fixes from pr comments 2016-09-03 12:32:13 +10: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