94 Commits

Author SHA1 Message Date
Eslam A. Hefnawy
fef9b68e5a refactored naming-js method naming 2016-11-10 19:05:02 +07:00
Eslam A. Hefnawy
61efd35850 added logical id names in naming-js file 2016-11-09 19:31:08 +07:00
Philipp Muens
c2c67b9d05 Fix failing tests 2016-11-01 15:00:16 +01:00
Philipp Muens
6188569238 Minor code style updates 2016-11-01 14:53:52 +01:00
Philipp Muens
fddc4db04f Merge branch 'master' into add-custom-per-function-roles 2016-11-01 14:43:21 +01:00
Philipp Muens
91fc7c97e6 Merge pull request #2521 from serverless/prettify-aws-compile-functions-error-messages
Prettify AwsCompileFunctions error messages
2016-10-24 15:53:29 +02:00
Philipp Muens
691eab5da6 Prettify AwsCompileFunctions error messages 2016-10-24 13:32:27 +02:00
Eslam A. Hefnawy
5379008ad8 fixed conflicts 2016-10-24 16:27:09 +07:00
Philipp Muens
81617dc46a Merge pull request #2425 from mankins/master
add ability for functions to override runtime to have multi-language …
2016-10-20 07:41:15 +02:00
Philipp Muens
c273abec68 Move AwsProvider plugin into aws directory 2016-10-19 08:32:06 +02:00
Philipp Muens
c7b7472a48 Update provider properties in plugins 2016-10-19 08:32:06 +02:00
Matt Mankins
c874cc86df [TEST] add tests for function override runtime PR#2425 2016-10-18 15:01:24 -04:00
Matt Mankins
c03e2a87dd add ability for functions to override runtime to have multi-language services 2016-10-17 18:46:12 -04:00
Erik Erikson
8dbbb596fe Merge branch 'master' into add-per-function-custom-roles
# Conflicts:
#	docs/02-providers/aws/02-iam.md
2016-10-17 10:43:07 -07:00
Philipp Muens
a7a04eb6f6 Closes #2292 - Remove outdated README.md files 2016-10-11 20:21:27 -07:00
Erik Erikson
a5c316cb31 Merge Changes
The split of stack configuration and function compilation required a more in depth merge.

Commentary: it also creates strange interaction of the expectations and code across those two files.
2016-10-04 17:27:32 -07:00
Erik Erikson
2a5cbcc07e Merge branch 'master' into reduce-scope-of-rights-of-default-iamlambdarole
# Conflicts:
#	lib/plugins/aws/deploy/compile/functions/index.js
#	lib/plugins/aws/deploy/compile/functions/tests/index.js
2016-10-04 16:25:44 -07:00
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
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
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
Erik Erikson
7af0b3d577 Merge branch 'master' into reduce-scope-of-rights-of-default-iamlambdarole 2016-09-27 12:26:05 -07: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
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
Erik Erikson
9ff80a10e5 "Fn:Join" => "Fn::Join"
(add a colon - otherwise, it is invalid and blows up stack creation)
2016-09-21 11:22:14 -07:00
Erik Erikson
7d40665fa4 Update Tests
(this is just getting embarassing - maybe I should set up a pre-hook?)
2016-09-19 13:12:38 -07:00
Erik Erikson
b768b47090 Remove the "RetentionInDays" Attribute
Hopefully this causes the system to fall back to the default setting for the account.
2016-09-19 13:04:44 -07: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
9d4ed7a13a Remove Unused Name Generation in CFT Template 2016-09-15 13:06:29 -07:00
Erik Erikson
82272165a0 Fix Policy Naming + Add LogGroup Tests
Correct policy naming by doing it in code with appropriate variables - previous code was incorrectly assuming that the template would be rendered with variable names.
Add tests to verify that the CloudWatch LogGroup resources are being properly added into the Service's CFT.
Add minor comment about line length reasoning for extra code.
2016-09-15 13:05:11 -07:00
Erik Erikson
596bb0eb98 Fix the tests to use the updated log group reference
TODO: verify the loggroup resource addition
2016-09-15 11:52:26 -07:00
Erik Erikson
b8134cb15e Create & Ref CloudWatch LogGroup
Remove the create log group permissions
Add CloudWatch LogGroup to the CFT
Reference the co-created CloudWatch LogGroup as one of the resources for the IamPolicyLambdaExecution's logging statement
2016-09-15 11:29:21 -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
Erik Erikson
017914e661 Specific Log Resources Specific to Functions
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.
2016-09-12 12:08:26 -07: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
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
John McKim
83a9d5e0fd fixes from pr comments 2016-09-03 12:32:13 +10:00
John McKim
ea864be300 merge with master 2016-09-02 07:17:57 +10: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