-
Notifications
You must be signed in to change notification settings - Fork 15
/
serverless.yml
71 lines (63 loc) · 1.93 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
frameworkVersion: ">=1.2.0 <2.0.0"
service: serverless-boilerplate # NOTE: update this with your service name
provider:
name: aws
runtime: nodejs10.x
cfLogs: true
environment:
SERVERLESS_STAGE: ${opt:stage, self:provider.stage}
SERVERLESS_PROJECT: ${self:service}
SERVERLESS_REGION: ${opt:region, self:provider.region}
TABLE_NAME: ${self:provider.environment.SERVERLESS_PROJECT}-${self:provider.environment.SERVERLESS_STAGE}
iamRoleStatements:
# - Effect: Allow
# Action:
# - dynamodb:*
# Resource: arn:aws:dynamodb:${self:provider.environment.SERVERLESS_REGION}:*:*
# - Effect: Allow
# Action:
# - SNS:*
# Resource: arn:aws:sns:${self:provider.environment.SERVERLESS_REGION}:*:*
# - Effect: Allow
# Action:
# - KMS:Decrypt
# Resource: ${self:custom.kmsSecrets.keyArn}
package:
individually: true
exclude:
- test/**
- .git/**
functions:
plugins:
- serverless-mocha-plugin
- serverless-webpack
- serverless-offline
- serverless-kms-secrets
- serverless-plugin-custom-roles
- serverless-plugin-split-stacks
custom:
serverless-mocha-plugin:
functionTemplate: templates/function.ejs
# Uncomment these if you need to run the service offline for testing
# preTestCommands:
# - bash .tools/startOffline.sh
# postTestCommands:
# - bash .tools/stopOffline.sh
webpackIncludeModules: true
# kmsSecrets: ${file(kms-secrets.${opt:stage, self:provider.stage}.${opt:region, self:provider.region}.yml)}
#resources:
# Resources:
# SessionsTable:
# Type: AWS::DynamoDB::Table
# DeletionPolicy: Delete
# Properties:
# AttributeDefinitions:
# - AttributeName: id
# AttributeType: S
# KeySchema:
# - AttributeName: id
# KeyType: HASH
# ProvisionedThroughput:
# ReadCapacityUnits: 1
# WriteCapacityUnits: 1
# TableName: ${self:provider.environment.TABLE_NAME}