mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
service: aws-nodejs # NOTE: update this with your service name
|
|
|
|
provider:
|
|
name: aws
|
|
runtime: nodejs6.10
|
|
|
|
functions:
|
|
hello:
|
|
handler: handler.hello
|
|
events:
|
|
# paths without a slash
|
|
- http:
|
|
method: POST
|
|
path: without-slash
|
|
integration: lambda
|
|
- http:
|
|
method: GET
|
|
path: without-slash
|
|
integration: lambda
|
|
- http:
|
|
method: PUT
|
|
path: without-slash
|
|
integration: lambda
|
|
- http:
|
|
method: DELETE
|
|
path: without-slash
|
|
integration: lambda
|
|
# paths with a slash
|
|
- http:
|
|
method: POST
|
|
path: /with-slash
|
|
integration: lambda
|
|
- http:
|
|
method: GET
|
|
path: /with-slash
|
|
integration: lambda
|
|
- http:
|
|
method: PUT
|
|
path: /with-slash
|
|
integration: lambda
|
|
- http:
|
|
method: DELETE
|
|
path: /with-slash
|
|
integration: lambda
|
|
# root only paths
|
|
- http:
|
|
method: POST
|
|
path: /
|
|
integration: lambda
|
|
- http:
|
|
method: GET
|
|
path: /
|
|
integration: lambda
|
|
- http:
|
|
method: PUT
|
|
path: /
|
|
integration: lambda
|
|
- http:
|
|
method: DELETE
|
|
path: /
|
|
integration: lambda
|