-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
69 lines (68 loc) · 1.67 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
service: boilerplate_serverless_nodejs
plugins:
- serverless-webpack
- serverless-offline
- serverless-plugin-split-stacks
- serverless-prune-plugin
custom:
stage: ${opt:stage, self:provider.stage}
region: ${opt:region, self:provider.region}
prefix: ${self:custom.stage}-${self:service}
# user_pool_id: ${env:USER_POOL_ID}
# user_pool_arn: ${env:USER_POOL_ARN}
webpackIncludeModules: true
babelOptions:
presets: ['es2015', 'es2016']
# For split stack and prevent Cloud Formation resources limit error
splitStacks:
perFunction: false
perType: true
perGroupFunction: false
prune:
automatic: true
number: 1
provider:
name: aws
runtime: nodejs10.x
region: us-east-1
stage: dev
timeout: 30 # Can be changed to your timeout for lambdas, or set for each lambda
memorySize: 1024 # Can be changed to your memory size
# Use your VPC network
# vpc:
# securityGroupIds:
# - "sg-11111"
# subnetIds:
# - "subnet-11111"
# - "subnet-1111"
environment:
NODE_ENV: ${self:custom.stage}
# For set IAM rules to lambdas
# iamRoleStatements:
# - Effect: "Allow"
# Action:
# - cognito-idp:AdminGetUser
package:
include:
- node_modules
exclude:
- node_modules/aws-sdk/**
# Lambdas
functions:
Test:
handler: controllers/index.handler
# timeout: 30
events:
- http:
path: /test
method: GET
cors: true
# CloudFormation template syntax, for create resources
# resources:
# Resources:
# Example:
# Type: AWS::SQS::Queue
# Properties:
# QueueName: example
# MessageRetentionPeriod: 1209600
# VisibilityTimeout: 9001