forked from jeremydaly/serverless-api-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
51 lines (46 loc) · 1.08 KB
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
service: serverless-api-sample
provider:
name: aws
runtime: nodejs8.10
stage: ${opt:stage,'dev'}
region: us-east-1
profile: <YOUR AWS PROFILE>
iamRoleStatements: # IAM Role Permissions
- Effect: "Allow"
Action:
- "logs:CreateLogGroup"
- "logs:CreateLogStream"
- "logs:PutLogEvents"
Resource: "*"
- Effect: "Allow"
Action:
- "s3:ListBucket"
Resource: { "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "ServerlessDeploymentBucket" } ] ] }
- Effect: "Allow"
Action:
- "s3:PutObject"
Resource:
Fn::Join:
- ""
- - "arn:aws:s3:::"
- "Ref" : "ServerlessDeploymentBucket"
- "/*"
# Custom variables
custom:
stages: # for stage manager
- dev
- staging
- prod
# Plugins
plugins:
- serverless-stage-manager
# Functions
functions:
serverless-api-sample:
name: ${self:service}-${self:provider.stage}-serverless-api-sample
handler: handler.router
timeout: 30
events:
- http:
path: 'v1/{proxy+}'
method: any