-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
63 lines (60 loc) · 1.33 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
service: cvs-svc-test-number
configValidationMode: warn
plugins:
- serverless-dynamodb
- serverless-offline
- serverless-plugin-typescript
- serverless-plugin-tracing
provider:
name: aws
runtime: nodejs18.x
lambdaHashingVersion: 20201221
tracing:
apiGateway: true
lambda: true
iam:
role:
statements:
- Effect: 'Allow'
Action:
- 'xray:PutTraceSegments'
- 'xray:PutTelemetryRecords'
Resource:
- '*'
functions:
generateTestNumber:
handler: src/handler.handler
resources:
Resources:
Users:
Type: AWS::DynamoDB::Table
Properties:
TableName: cvs-local-test-number
AttributeDefinitions:
- AttributeName: testNumberKey
AttributeType: N
KeySchema:
- AttributeName: testNumberKey
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
custom:
serverless-offline:
lambdaPort: 3008
serverless-dynamodb:
start:
port: 8008
inMemory: true
migrate: true
seed: true
noStart: false
host: 127.0.0.1
seed:
test-number:
sources:
- table: cvs-local-test-number
sources: [./tests/resources/test-number.json]
stages:
- dev
- test