-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserverless.yml
81 lines (76 loc) · 3.06 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
72
73
74
75
76
77
78
79
80
81
service: serverless-template
frameworkVersion: "=1.39.1"
plugins:
- serverless-webpack # Must be first, see https://github.com/99xt/serverless-dynamodb-local#using-with-serverless-offline-and-serverless-webpack-plugin
# - serverless-sentry # https://github.com/arabold/serverless-sentry-plugin
- '@unly/serverless-env-copy-plugin' # See https://github.com/UnlyEd/serverless-env-copy-plugin
- serverless-offline
# - serverless-domain-manager # See https://github.com/amplify-education/serverless-domain-manager
custom:
env: ${env:ENV, 'development'} # Defaults to "development" if not provided (see package.json scripts)
envs:
development:
profile: sandbox # XXX staging profile
memorySize: 128
staging:
profile: sandbox # XXX staging profile
memorySize: 128
production:
profile: sandbox # XXX production profile
memorySize: 128
# sentry:
# dsn: # url sentry
# organization: unly
# project: # project name
# authToken: # XXX Duplicated in .sentryclirc and both must be updated accordingly
# release: # https://github.com/arabold/serverless-sentry-plugin#releases
# version: true
# filterLocal: false # We don't filter local errors because we want to help dev with additional debug information when working on localhost
serverless-offline:
port: 3000
webpack:
packager: 'yarn'
webpackConfig: ./webpack.config.js
# serverless-webpack configuration
# Enable auto-packing of external modules
includeModules: true
# customDomain:
# enabled: ${self:custom.envs.${self:custom.env}.domain.enabled}
# domainName: ${self:custom.envs.${self:custom.env}.domain.name}
# certificateName: ${self:custom.envs.${self:custom.env}.domain.certificateName}
# basePath: 'api' # This will be prefixed to all routes
# stage: ${self:provider.stage}
# createRoute53Record: true
provider:
name: aws
runtime: nodejs8.10
versionFunctions: false
logRetentionInDays: 60
timeout: 30
memorySize: ${self:custom.envs.${self:provider.stage}.memorySize, '128'}
stage: ${self:custom.env} # XXX The stage directly depends on the environment, it's the same thing
region: ${opt:region, 'eu-west-1'} # Ireland by default, must always be Ireland
environment:
NODE_ENV: ${self:custom.env} # XXX Necessary to provide this because sometimes some packages rely on the NODE_ENV
SERVICE: ${self:service}
profile: ${self:custom.envs.${self:provider.stage}.profile, ''}
logs:
restApi: true # Enable logs in other services, such as API GW - See https://serverless.com/blog/framework-release-v142/
apiGateway:
binaryMediaTypes:
- '*/*' # Allow to return all binary response types - See https://serverless.com/blog/framework-release-v142/
deploymentBucket:
serverSideEncryption: AES256
stackTags:
env: ${self:custom.env}
stage: ${self:provider.stage}
region: ${self:provider.region}
service: ${self:service}
runtime: ${self:provider.runtime}
functions:
status:
handler: src/functions/status.handler
events:
- http:
path: status
method: get