Repository navigation
Expand file tree
/
Copy pathserverless.yml
More file actions
95 lines (87 loc) · 2.11 KB
/
Copy pathserverless.yml
File metadata and controls
95 lines (87 loc) · 2.11 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
# Welcome to Serverless!
# Ref: docs.serverless.com
service: lambda-language-comparison
provider:
name: aws
logs:
restApi: true
region: ap-southeast-2
iamRoleStatements:
- Effect: Allow
Action:
- "dynamodb:*"
Resource: "arn:aws:dynamodb:ap-southeast-2:*:table/LanguageTest/*"
- Effect: Allow
Action:
- "dynamodb:*"
Resource: "arn:aws:dynamodb:ap-southeast-2:*:table/LanguageTest"
package:
individually: true
plugins:
- serverless-domain-manager
functions:
nodejs:
runtime: nodejs12.x
handler: node12/handler.handler
package:
exclude:
- '*/**'
- '*'
include:
- 'node12/**'
- 'node_modules/uuid/**'
events:
- http:
path: /node12
method: get
java8:
runtime: java8
package:
artifact: java8/target/java8-dev.jar
handler: com.mycodefu.Handler
events:
- http:
path: /java8
method: get
java11:
runtime: java11
package:
artifact: java11/target/java11-dev.jar
handler: com.mycodefu.Handler
events:
- http:
path: /java11
method: get
custom:
customDomain:
domainName: api.mycodefu.com
basePath: 'language-test'
stage: ${self:provider.stage}
resources:
Resources:
QuotesDynamoTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: LanguageTest
AttributeDefinitions:
- AttributeName: TestGroup
AttributeType: S
- AttributeName: TestId
AttributeType: S
- AttributeName: ModifiedDateEpoch
AttributeType: N
KeySchema:
- AttributeName: TestGroup
KeyType: HASH
- AttributeName: TestId
KeyType: RANGE
LocalSecondaryIndexes:
- IndexName: date-modified-index
KeySchema:
- AttributeName: TestGroup
KeyType: HASH
- AttributeName: ModifiedDateEpoch
KeyType: RANGE
Projection:
ProjectionType: KEYS_ONLY
BillingMode: PAY_PER_REQUEST