-
Notifications
You must be signed in to change notification settings - Fork 3
/
serverless.yml
55 lines (51 loc) · 1.46 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
service: angular-lambda-ssr
provider:
name: aws
runtime: nodejs12.x
memorySize: 192
timeout: 10
region: us-east-1
package:
exclude:
- ./**
include:
- "node_modules/html-minifier/**"
- "node_modules/commander/**"
- "node_modules/html-minifier/**"
- "node_modules/upper-case/**"
- "node_modules/clean-css/**"
- "node_modules/source-map/**"
- "node_modules/lower-case/**"
- "node_modules/no-case/**"
- "node_modules/he/**"
- "node_modules/param-case/**"
- "node_modules/relateurl/**"
- "node_modules/uglify-js/**"
- "node_modules/serverless-http/**"
- "dist/**"
- "lambda.js"
functions:
ssr-origin-req:
handler: lambda.handler
role: !GetAtt LambdaEdgeFunctionRole.Arn
resources:
Resources:
# the role that the lambda function will assume. Also notice the edgelambda in the principal part
LambdaEdgeFunctionRole:
Type: "AWS::IAM::Role"
Properties:
Path: "/"
ManagedPolicyArns:
- "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
-
Sid: "AllowLambdaServiceToAssumeRole"
Effect: "Allow"
Action:
- "sts:AssumeRole"
Principal:
Service:
- "lambda.amazonaws.com"
- "edgelambda.amazonaws.com"