63 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
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
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
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
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
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
Eslam A. Hefnawy
a5218fb686 fixed conflicts with master 2016-08-31 23:27:17 +09:00
Eslam A. Hefnawy
ae4f094bc7 fix linting issues 2016-08-31 23:27:17 +09:00
Eslam A. Hefnawy
d475b386a4 logical IDs updates 2016-08-31 23:27:17 +09:00
Eslam A. Hefnawy
959d0a17d3 updated tests with new logical ids 2016-08-31 23:27:17 +09:00
Eslam A. Hefnawy
a5e3c31974 updating logical ids 2016-08-31 23:25:15 +09:00
John McKim
ff8a6cc71f remove todo and ensure createstack returns promise 2016-08-30 08:40:14 +10:00
堀家隆宏
d9c62e68fb Add iamRoleARN to serverless.yml 2016-08-28 22:36:06 +09:00
John McKim
5a5240ccc5 fix tests after merge with master 2016-08-25 07:39:39 +10:00
John McKim
a413a4a471 merge 2016-08-25 07:23:47 +10:00
Philipp Muens
3cac122ed9 Update compileFunctions code
So that the S3Key properties are prepended with the artifactDirectoryName.
2016-08-24 11:37:19 +02:00
John McKim
5a2c9d2224 update packaging to support individual packages per function 2016-08-22 07:40:16 +10:00
Philipp Muens
6e4e693804 Remove unnecessary empty-object-setting of Outputs section 2016-08-15 15:46:37 +02:00
Philipp Muens
919caa8f91 Remove validations for existence of compiledCloudFormationTemplate
Because it's already available at the beginning of the deploy plugin as the core CloudFormation
template will be attached there (which is then used to merge other resources into it later on).
2016-08-15 15:36:54 +02:00
Philipp Muens
9fadb31d0b Introduce provider.compiledCloudFormationTemplate section
This section is used to store the core CloudFormation template and merge compiled resources into it.
2016-08-15 15:19:04 +02:00
Philipp Muens
93086a192f Update custom provider resource merging 2016-08-12 15:52:21 +02:00
Philipp Muens
a0f7bb20d1 Add tests to increase test coverage 2016-08-08 08:27:26 +02:00
Eslam A. Hefnawy
de20ab4a90 fixed tests 2016-08-05 00:38:31 +09:00
Eslam A. Hefnawy
1c70f20486 removed compile function fallback for function name 2016-08-05 00:23:14 +09:00
Benny Bauer
38509dded6 fix 1468 - remove accountId, fix memorySize reference and cover with test 2016-07-29 13:07:11 +02:00
Benny Bauer
d587dd93a6 fix 1468 - handle non existing stack and errors + add tests 2016-07-29 13:06:59 +02:00
Benny Bauer
9f0c506c75 fix 1468 - display endpoints
Display general information on service, functions and endpoints.
Add tests.

partial fix for #1468 - display endpoints

fix 1468 - display endpoints

Display general information on service, functions and endpoints.
Add tests.
2016-07-29 13:01:15 +02:00
Eslam A. Hefnawy
cce0b02a0c fixed test for vpc 2016-07-29 19:05:09 +09:00
Eslam A. Hefnawy
a7f4d544a3 added service level vpc config 2016-07-29 18:50:00 +09:00
Eslam A. Hefnawy
3e0fe086b1 added support for VPC with tests and docs 2016-07-29 16:46:52 +09:00
Philipp Muens
c9d1453d3a Switch from .yaml to the more convenient .yml 2016-07-27 10:39:41 +02:00
Philipp Muens
994bb69372 Change memory to memorySize so that the config naming is consistent 2016-07-26 06:34:59 +02:00
Philipp Muens
3290ced8ee Remove hard service runtime dependency 2016-07-22 17:19:08 +02:00
Philipp Muens
cd098cac21 Add service bound runtime functionality 2016-07-12 20:39:34 +02:00
Philipp Muens
4519e0fb32 Rename coreBucket name to be more meaningful 2016-07-12 11:36:46 +02:00
Philipp Muens
eeee34fa5b Make coreBucket name unique 2016-07-12 10:31:38 +02:00