32 Commits

Author SHA1 Message Date
Erik Erikson
97b22e6ee3 Merge branch 'master' into rebuild-credentials
# Conflicts:
#	lib/plugins/aws/tests/index.js
2016-10-04 15:26:57 -07: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
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
David Tanner
d490ed413e Rename to deploymentBucket as recommended by @flomotlik 2016-09-23 08:18:33 -06:00
David Tanner
1a8b94cc4f Upping code coverage.
Found some unused code when looking for throttling errors, added functionality to get code from SDK errors.
Added tests to cover functionality.
Fixed prefix to be serverless/{serviceName}/{stage}
2016-09-22 15:55:52 -06:00
David Tanner
66525f259e Deploy by service and stage.
Check that the bucket exists before, and that it is in the correct stage
2016-09-22 10:24:35 -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
47e654fe71 Fix profile handling when other keys are present 2016-09-16 15:38:27 +02:00
Florian Motlik
07a22d0702 Merge pull request #2015 from rowanu/aws-provider-profile
Support provider > profile and profile per stage
2016-09-16 14:05:41 +02:00
Andrew McClenaghan
b92de4ba40 Update to use describeStackResource 2016-09-15 20:56:00 +10:00
Eslam A. Hefnawy
0cec5804c3 updated link to docs 2016-09-09 18:08:41 +09:00
rowan
474326f4c7 Fix eslint error. 2016-09-05 15:34:56 +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
Eslam A. Hefnawy
5dafeee388 basic new variable system 2016-08-31 16:37:58 +09:00
Eslam A. Hefnawy
38b1e177fd fixed aws missing creds error message 2016-08-11 19:07:01 +09:00
Eslam A. Hefnawy
93a86fbfdb added friendly error for missing aws creds 2016-08-11 19:03:05 +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
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
Scott Willeke
a424fcbf36 related to #1638. fixes build issue with lint 2016-07-21 19:59:08 -07:00
Scott Willeke
5049fbb555 fixes serverless/serverless#1638 2016-07-21 19:13:10 -07: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
Eslam A. Hefnawy
c5af2f782c not throwing error if profile doesn't exist 2016-06-21 18:48:01 +02:00
Eslam A. Hefnawy
1a1ec2103f removed aws api keys handling 2016-06-21 18:21:53 +02:00
Eslam A. Hefnawy
135330995b added tests for aws sdk 2016-06-21 17:27:18 +02:00
Eslam A. Hefnawy
598d65797c cleaning aws sdk file 2016-06-21 13:47:19 +02:00
Philipp Muens
f6a631482a Add some minor code convention changes 2016-06-21 13:29:06 +02:00
Eslam A. Hefnawy
afe2321b11 fixed integration tests 2016-06-21 13:03:58 +02:00
Eslam A. Hefnawy
2c20687793 update plugins for provider-per-service arch 2016-06-19 21:38:01 +02:00