1189 Commits

Author SHA1 Message Date
Erik Erikson
3b4a5adbb5 Merge branch 'master' into reduce-scope-of-rights-of-default-iamlambdarole 2016-10-06 09:37:10 -07:00
Erik Erikson
a81e36bf6e Add 'CAPABILITY_NAMED_IAM'
To the "createStack" call.  This allows for custom named IAM resources to be created within the stack that is sent.  I'm not sure that it won't create issues in some user's cases where they have very locked down rights.
2016-10-06 00:46:51 -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
9a78d181ad Merge Changes 2016-10-04 15:31:30 -07:00
Erik Erikson
97b22e6ee3 Merge branch 'master' into rebuild-credentials
# Conflicts:
#	lib/plugins/aws/tests/index.js
2016-10-04 15:26:57 -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
Philipp Muens
8ba191a5d7 Update misleading comment 2016-10-04 13:53:02 -07:00
Philipp Muens
0e9ad41250 Remove resetting of request / response config and show a warning message instead 2016-10-04 13:53:02 -07:00
Philipp Muens
96537755b3 Update integrationResponses to be an array 2016-10-04 13:53:02 -07:00
Philipp Muens
2ebfd90893 Fix linting errors 2016-10-04 13:53:02 -07:00
Philipp Muens
0ea8ab732c Make tests for config clearing when using AWS_PROXY more explicit 2016-10-04 13:53:02 -07:00
Philipp Muens
090aa52bf1 Reset / remove irrelevant configuration when AWS_PROXY is used 2016-10-04 13:53:02 -07:00
Philipp Muens
3b1eec6155 Add Lambda proxy functionality for API Gateway 2016-10-04 13:53:02 -07:00
Erik Erikson
bc321eafc5 Remove check protected by anyFunctionHasNoRole in configureStack 2016-10-04 13:25:17 -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
Eslam λ Hefnawy
7cef2e3895 Merge pull request #2245 from serverless/fix-promise-chain-in-deploy-function-plugin
Fix Promise chain in deployFunction plugin
2016-10-04 00:04:16 +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
Sander van de Graaf
3c15f0e04c
make eslint happy 2016-10-03 12:48:06 +02:00
Sander van de Graaf
f121d6c1ed
added --verbose option for info, which will add Stack Outputs to the output 2016-10-03 12:41:31 +02:00
Philipp Muens
c1f10c9556 Fix Promise chain in deployFunction plugin 2016-09-30 15:09:47 -07:00
Philipp Muens
94792284c8 Merge pull request #2198 from zorrofox/master
fix: #1973 deploy fails with unhelpful error message when service name is not a valid CF stack name
2016-09-30 23:03:01 +02: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
83dfb88302 Fix typos 2016-09-30 05:45:51 -06:00
zorrofox
9d04ca0a68 modify error message according to the review 2016-09-30 09:22:20 +01:00
David Tanner
71c649b6aa Fix linting issue 2016-09-28 09:33:00 -06:00
David Tanner
f544b778cb Cleaning up the tests to avoid timeouts, might be because of writing file? 2016-09-28 09:27:43 -06:00
David Tanner
4f9f173a3c Fix linting issues, and restore deployFunction 2016-09-28 09:09:21 -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
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
Erik Erikson
2cfd611329 Rebuild Credential Handling
(scoped to AWS)
Previously you had a number of options, including legacy options for loading credentials.  Given the 0.x=>1.x change, we can drop a lot of the old approaches.  This PR attempts to bring all the good things.

The options for loading credentials are as follows:
1. define credentials on serverless.yml=>service.provider.credentials = { accessKeyId: 'accessKeyId', secretAccessKey: 'secretAccessKey', sessionToken: 'sessionToken' }
2. define a profile from which to get credentials on serverless.yml=>service.provider.profile = 'profile-name' (all profiles loaded using AWS.SharedIniFileCredentials, see http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SharedIniFileCredentials.html)
3. define credentials for all stages using the standard AWS environment variables (see http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/EnvironmentCredentials.html)
4. define a profile for all stages using the environment variable AWS_PROFILE
5. define credentials for each stage using the standard AWS environment variables with the STAGE name inserted (e.g. stage='test', envVarName='AWS_TEST_*')
6. define a profile for each stage using an environment variable `AWS_${stageName.toUpperCase()}_PROFILE`

If credentials/profiles are declared in multiple ways, the later cases will override the former.

These use cases previously covered all user requirements but the current implemenation allows for an expansion of mechanisms if more mechanisms are desirable.
2016-09-27 16:08:00 -07: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
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
Philipp Muens
eb4d17d1b5 Fix linting issues 2016-09-27 12:04:15 +02:00
Philipp Muens
3e93d244d3 Add subdirectory for tmpDirs
Add a subdirectory so that all directories which are generated for the tests are stored there.
Furthermore old tests are updated so that they use the tmpDir name generated by the test
utils functionality. This makes working with Docker way better as the tmpDirs are not created
It the root directory.
2016-09-27 11:48:14 +02:00
Erik Erikson
9497b4149e Merge branch 'master' into reduce-scope-of-rights-of-default-iamlambdarole 2016-09-26 17:41:46 -07:00
Erik Erikson
fc1a186d23 Merge branch 'master' into add-per-function-custom-roles 2016-09-26 14:18:25 -07:00
Sander van de Graaf
d97808008e
make eslint happy 2016-09-26 13:20:52 +02:00
Sander van de Graaf
d90fe1636a
added tests for query parameters 2016-09-26 13:16:58 +02:00