Skip to content

Commit c0f1363

Browse files
author
Yunspace
committed
Merge branch 'master' into dotnetcore2.0
# Conflicts: # .gitignore # tests/templates/test_all_templates
2 parents 35ec725 + eb975dd commit c0f1363

File tree

116 files changed

+3914
-2162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+3914
-2162
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ jest
5454
*.swp
5555

5656
# DotNet
57-
bin/
58-
obj/
57+
[Bb]in/
58+
[Oo]bj/

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# 1.26.0 (29.01.2018)
2+
- [AWS Go support](https://github.com/serverless/serverless/pull/4669)
3+
- [Support for using an existing ApiGateway and Resources](https://github.com/serverless/serverless/pull/4247)
4+
- [Add logRetentionInDays config](https://github.com/serverless/serverless/pull/4591)
5+
- [Add support of `serverless.js` configuration file](https://github.com/serverless/serverless/pull/4590)
6+
- [Add "did you mean..." CLI suggestions](https://github.com/serverless/serverless/pull/4586)
7+
- [Add `--template-path` option to `serverless create`](https://github.com/serverless/serverless/pull/4576)
8+
- [Add support POJO input support for Java invoke local](https://github.com/serverless/serverless/pull/4596)
9+
10+
## Meta
11+
- [Comparison since last release](https://github.com/serverless/serverless/compare/v1.25.0...v1.26.0)
12+
13+
114
# 1.25.0 (20.12.2017)
215
- [Improve Stage and Region Usage](https://github.com/serverless/serverless/pull/4560)
316
- [Add API Gateway endpoint configuration](https://github.com/serverless/serverless/pull/4531)

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ The following are services you can instantly install and use by running `serverl
132132

133133
## <a name="features"></a>Features
134134

135-
* Supports Node.js, Python, Java, Scala, C#, F#, Groovy, Kotlin, PHP & Swift.
135+
* Supports Node.js, Python, Java, Scala, C#, F#, Go, Groovy, Kotlin, PHP & Swift.
136136
* Manages the lifecycle of your serverless architecture (build, deploy, update, delete).
137137
* Safely deploy functions, events and their required resources together via provider resource managers (e.g., AWS CloudFormation).
138138
* Functions can be grouped ("serverless services") for easy management of code, resources & processes, across large projects & teams.
@@ -158,7 +158,7 @@ This table is generated from https://github.com/serverless/plugins/blob/master/p
158158
| **[Raml Serverless](https://github.com/andrewcurioso/raml-serverless)** <br/> Serverless plugin to work with RAML API spec documents | [andrewcurioso](http://github.com/andrewcurioso) |
159159
| **[Serverless Alexa Plugin](https://github.com/rajington/serverless-alexa-plugin)** <br/> Serverless plugin to support Alexa Lambda events | [rajington](http://github.com/rajington) |
160160
| **[Serverless Api Stage](https://github.com/leftclickben/serverless-api-stage)** <br/> Serverless API Stage plugin, enables stage variables and logging for AWS API Gateway. | [leftclickben](http://github.com/leftclickben) |
161-
| **[Serverless Apig S3](https://github.com/sdd/serverless-apig-s3)** <br/> Serve static front-end content from S3 via the API Gatewy and deploy client bundle to S3. | [sdd](http://github.com/sdd) |
161+
| **[Serverless Apig S3](https://github.com/sdd/serverless-apig-s3)** <br/> Serve static front-end content from S3 via the API Gateway and deploy client bundle to S3. | [sdd](http://github.com/sdd) |
162162
| **[Serverless Apigateway Plugin](https://github.com/GFG/serverless-apigateway-plugin)** <br/> Configure the AWS api gateway: Binary support, Headers and Body template mappings | [GFG](http://github.com/GFG) |
163163
| **[Serverless Apigw Binary](https://github.com/maciejtreder/serverless-apigw-binary)** <br/> Plugin to enable binary support in AWS API Gateway. | [maciejtreder](http://github.com/maciejtreder) |
164164
| **[Serverless Apigwy Binary](https://github.com/ryanmurakami/serverless-apigwy-binary)** <br/> Serverless plugin for configuring API Gateway to return binary responses | [ryanmurakami](http://github.com/ryanmurakami) |
@@ -263,6 +263,7 @@ This table is generated from https://github.com/serverless/examples/blob/master/
263263
-->
264264
| Project Name | Author |
265265
|:-------------|:------:|
266+
| **[Serverless Architecture Boilerplate](https://github.com/msfidelis/serverless-architecture-boilerplate)** <br/> Boilerplate to organize and deploy big projects using Serverless and CloudFormation on AWS | [msfidelis](http://github.com/msfidelis) |
266267
| **[Jwtauthorizr](https://github.com/serverlessbuch/jwtAuthorizr)** <br/> Custom JWT Authorizer Lambda function for Amazon API Gateway with Bearer JWT | [serverlessbuch](http://github.com/serverlessbuch) |
267268
| **[Serverless Graphql Api](https://github.com/boazdejong/serverless-graphql-api)** <br/> Serverless GraphQL API using Lambda and DynamoDB | [boazdejong](http://github.com/boazdejong) |
268269
| **[Serverless Screenshot](https://github.com/svdgraaf/serverless-screenshot)** <br/> Serverless Screenshot Service using PhantomJS | [svdgraaf](http://github.com/svdgraaf) |

docker-compose.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,19 @@ services:
6060
volumes:
6161
- ./tmp/serverless-integration-test-aws-csharp:/app
6262
aws-fsharp:
63-
image: microsoft/dotnet:1.0.4-sdk
63+
image: microsoft/dotnet:2.0-sdk
6464
volumes:
6565
- ./tmp/serverless-integration-test-aws-fsharp:/app
66+
aws-go:
67+
image: golang:1.9
68+
volumes:
69+
- ./tmp/serverless-integration-test-aws-go:/app
70+
- ./tmp/serverless-integration-test-aws-go:/go/src/app
71+
aws-go-dep:
72+
image: yunspace/golang:1.9
73+
volumes:
74+
- ./tmp/serverless-integration-test-aws-go-dep:/app
75+
- ./tmp/serverless-integration-test-aws-go-dep:/go/src/app
6676
aws-nodejs-typescript:
6777
image: node:6.10.3
6878
volumes:

docs/providers/aws/events/alexa-skill.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,41 @@ layout: Doc
1414

1515
## Event definition
1616

17-
This will enable your Lambda function to be called by an Alexa skill kit.
17+
This will enable your Lambda function to be called by an Alexa Skill kit.
18+
`amzn1.ask.skill.xx-xx-xx-xx-xx` is a skill ID for Alexa Skills kit. You receive a skill ID once you register and create a skill in [Amazon Developer Console](https://developer.amazon.com/).
19+
After deploying, add your deployed Lambda function ARN to which this event is attached to the Service Endpoint under Configuration on Amazon Developer Console.
1820

1921
```yml
2022
functions:
2123
mySkill:
2224
handler: mySkill.handler
2325
events:
24-
- alexaSkill
26+
- alexaSkill: amzn1.ask.skill.xx-xx-xx-xx-xx
2527
```
2628
2729
You can find detailed guides on how to create an Alexa Skill with Serverless using NodeJS [here](https://github.com/serverless/examples/tree/master/aws-node-alexa-skill) as well as in combination with Python [here](https://github.com/serverless/examples/tree/master/aws-python-alexa-skill).
30+
31+
## Enabling / Disabling
32+
33+
**Note:** `alexaSkill` events are enabled by default.
34+
35+
This will create and attach a alexaSkill event for the `mySkill` function which is disabled. If enabled it will call
36+
the `mySkill` function by an Alexa Skill.
37+
38+
```yaml
39+
functions:
40+
mySkill:
41+
handler: mySkill.handler
42+
events:
43+
- alexaSkill:
44+
appId: amzn1.ask.skill.xx-xx-xx-xx
45+
enabled: false
46+
```
47+
48+
## Backwards compatibility
49+
50+
Previous syntax of this event didn't require a skill ID as parameter, but according to [Amazon's documentation](https://developer.amazon.com/docs/custom-skills/host-a-custom-skill-as-an-aws-lambda-function.html#configuring-the-alexa-skills-kit-trigger) you should restrict your lambda function to be executed only by your skill.
51+
52+
Omitting the skill id will make your Lambda function available for the public, allowing any other skill developer to invoke it.
53+
54+
(This is important, as [opposing to custom HTTPS endpoints](https://developer.amazon.com/docs/custom-skills/handle-requests-sent-by-alexa.html#request-verify), there's no way to validate the request was sent by your skill.)

docs/providers/aws/events/apigateway.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ functions:
872872
873873
```
874874

875-
In case the application has many chilren and grandchildren paths, you also want to break them out into smaller services.
875+
In case the application has many children and grandchildren paths, you also want to break them out into smaller services.
876876

877877
```yml
878878
service: service-a

docs/providers/aws/events/cloudwatch-log.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ layout: Doc
1414

1515
## Simple event definition
1616

17-
This will enable your Lambda function to be called by an Log Stream.
17+
This will enable your Lambda function to be called by a Log Stream.
1818

1919
```yml
2020
functions:

docs/providers/aws/examples/hello-world/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Pick your language of choice:
1717

1818
* [JavaScript](./node)
1919
* [Python](./python)
20-
* [csharp](./csharp)
20+
* [C#](./csharp)
21+
* [F#](./fsharp)
22+
* [Go](./go)
2123

2224
[View all examples](https://www.serverless.com/framework/docs/providers/aws/examples/)

docs/providers/aws/examples/hello-world/csharp/README.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,32 @@ layout: Doc
1313

1414
Make sure `serverless` is installed. [See installation guide](../../../guide/installation.md).
1515

16+
Once installed the Serverless CLI can be called with `serverless` or the shorthand `sls` command.
17+
18+
```
19+
$ sls
20+
21+
Commands
22+
* You can run commands with "serverless" or the shortcut "sls"
23+
* Pass "--verbose" to this command to get in-depth plugin info
24+
* Pass "--no-color" to disable CLI colors
25+
* Pass "--help" after any <command> for contextual help
26+
```
27+
1628
## 1. Create a service
17-
`serverless create --template aws-csharp --path myService` or `sls create --template aws-csharp --path myService`, where 'myService' is a new folder to be created with template service files. Change directories into this new folder.
29+
30+
```
31+
sls create --template aws-csharp --path myService
32+
```
33+
34+
Using the `create` command we can specify one of the available [templates](https://serverless.com/framework/docs/providers/aws/cli-reference/create#available-templates). For this example use aws-csharp with the `--template` or shorthand `-t` flag.
35+
36+
The `--path` or shorthand `-p` is the location to be created with the template service files. Change directories into this new folder.
1837

1938
## 2. Build using .NET CLI tools and create zip package
2039

2140
```
22-
# Linux or OSX
41+
# Linux or Mac OS
2342
./build.sh
2443
```
2544

@@ -29,14 +48,23 @@ Make sure `serverless` is installed. [See installation guide](../../../guide/ins
2948
```
3049

3150
## 3. Deploy
32-
`serverless deploy` or `sls deploy`. `sls` is shorthand for the Serverless CLI command
51+
52+
```
53+
sls deploy
54+
```
55+
56+
This will deploy your function to AWS Lambda based on the settings in `serverless.yml`.
57+
3358

3459
## 4. Invoke deployed function
35-
`serverless invoke --function hello` or `serverless invoke -f hello`
3660

37-
`-f` is shorthand for `--function`
61+
```
62+
sls invoke -f hello
63+
```
64+
65+
Invoke deployed function with command `invoke` and `--function` or shorthand `-f`.
3866

39-
In your terminal window you should see the response from AWS Lambda
67+
In your terminal window you should see the response from AWS Lambda.
4068

4169
```bash
4270
{
@@ -49,4 +77,4 @@ In your terminal window you should see the response from AWS Lambda
4977
}
5078
```
5179

52-
Congrats you have just deployed and run your Hello World function!
80+
Congrats you have deployed and ran your Hello World function!

docs/providers/aws/examples/hello-world/fsharp/Handler.fs

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/providers/aws/examples/hello-world/fsharp/README.md

Lines changed: 55 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,69 @@ layout: Doc
77

88
# Hello World F# Example
99

10-
## Prerequisites
10+
Make sure `serverless` is installed. [See installation guide](../../../guide/installation.md).
1111

12-
* Make sure `serverless` is installed. [See installation guide](../../../guide/installation.md).
13-
* [.Net Core 1.0.1 SDK](https://www.microsoft.com/net/download/core)
14-
* 1.1 isn't currently supported by AWS Lambda
15-
* [NodeJS v4 or higher](https://nodejs.org/en/)
16-
* An AWS Account
12+
Once installed the Serverless CLI can be called with `serverless` or the shorthand `sls` command.
1713

18-
## Build and Package
14+
```
15+
$ sls
16+
17+
Commands
18+
* You can run commands with "serverless" or the shortcut "sls"
19+
* Pass "--verbose" to this command to get in-depth plugin info
20+
* Pass "--no-color" to disable CLI colors
21+
* Pass "--help" after any <command> for contextual help
22+
```
1923

20-
From the root of this directory, run `build.cmd`, or `build.sh` if on Linux / Mac.
24+
## 1. Create a service
2125

22-
This will produce your deployment package at `bin/release/netcoreapp1.0/deploy-package.zip`.
26+
```
27+
sls create --template aws-fsharp --path myService
28+
```
2329

24-
## Deployment and Invocation
30+
Using the `create` command we can specify one of the available [templates](https://serverless.com/framework/docs/providers/aws/cli-reference/create#available-templates). For this example use aws-fsharp with the `--template` or shorthand `-t` flag.
2531

26-
Once packaged, you can follow [these instructions](https://github.com/serverless/serverless#quick-start) to deploy and remotely invoke the function on AWS Lambda.
32+
The `--path` or shorthand `-p` is the location to be created with the template service files. Change directories into this new folder.
2733

28-
In short the commands you will need to run are (from the root of this directory):
34+
## 2. Build using .NET Core 2.X CLI tools and create zip package
2935

3036
```
31-
serverless config credentials --provider aws --key {YourAwsAccessKey} --secret {YourAwsSecret}
32-
serverless deploy -v
33-
serverless invoke -f hello -l
34-
serverless remove
37+
# Linux or Mac OS
38+
./build.sh
39+
```
40+
41+
```
42+
# Windows PowerShell
43+
./build.cmd
44+
```
45+
46+
## 3. Deploy
47+
48+
```
49+
sls deploy
50+
```
51+
52+
This will deploy your function to AWS Lambda based on the settings in `serverless.yml`.
53+
54+
## 4. Invoke deployed function
55+
56+
```
57+
sls invoke -f hello
58+
```
59+
60+
Invoke deployed function with command `invoke` and `--function` or shorthand `-f`.
61+
62+
In your terminal window you should see the response from AWS Lambda.
63+
64+
```bash
65+
{
66+
"Message": "Go Serverless v1.0! Your function executed successfully!",
67+
"Request": {
68+
"Key1": null,
69+
"Key2": null,
70+
"Key3": null
71+
}
72+
}
3573
```
3674

37-
By default this template deploys to us-east-1, you can change that in "serverless.yml" under the `region: us-east-1` key.
75+
Congrats you have deployed and ran your Hello World function!

docs/providers/aws/examples/hello-world/fsharp/aws-fsharp.fsproj

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)