-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserverless.yml
86 lines (82 loc) · 1.83 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
82
83
84
85
86
service: cvs-svc-test-types
provider:
name: aws
runtime: nodejs18.x
region: eu-west-1
stage: dev
tracing:
lambda: true
apiGateway: true
iam:
role:
statements:
- Effect: "Allow"
Action:
- "xray:PutTraceSegments"
- "xray:PutTelemetryRecords"
Resource:
- "*"
plugins:
- serverless-offline
- serverless-dynamodb
- serverless-plugin-tracing
- serverless-plugin-typescript
functions:
getTestTypes:
environment:
BRANCH: local
handler: src/handler.handler
events:
- http:
path: test-types
method: get
- http:
path: test-types/{id}
method: get
request:
parameters:
paths:
id: true
query:
fields: true
vehicleType: true
vehicleSize: true
vehicleConfiguration: true
vehicleAxles: false
resources:
Resources:
Users:
Type: AWS::DynamoDB::Table
Properties:
TableName: cvs-local-test-types
AttributeDefinitions:
- AttributeName: id
AttributeType: S
- AttributeName: name
AttributeType: S
KeySchema:
- AttributeName: id
KeyType: HASH
- AttributeName: name
KeyType: RANGE
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
custom:
serverless-offline:
httpPort: 3005
serverless-dynamodb:
start:
port: 8002
inMemory: true
migrate: true
seed: true
noStart: false
host: 127.0.0.1
seed:
test-types:
sources:
- table: cvs-local-test-types
sources: [./tests/resources/test-types.json]
stages:
- dev