-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
66 lines (57 loc) · 1.43 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
service: microservicio-estadisticasclimaticas-smn-aws
frameworkVersion: '3'
provider:
name: aws
runtime: nodejs18.x
stage: dev
region : us-west-2
memorySize: 512
timeout : 10
environment:
${file(./serverless_ssm.yml)}
apiGateway:
apiKeys:
- name : xApiKey
value : ${file(./serverless_ssm.yml):X_API_KEY}
logs:
# Enable REST API logs
restApi:
accessLogging: true
format: "requestId: $context.requestId"
executionLogging: true
level: INFO
fullExecutionData: true
role: arn:aws:iam::xxxx:role
roleManagedExternally: false
plugins:
- serverless-dynamodb-local
- serverless-offline-ssm
- serverless-offline
functions:
insertEstadisticasClimaticas:
handler: src/controllers/estadisticasClimaticas/insert.handler
description: Function to insert an object in the estadisticas climaticas table
events:
- http:
method: post
path: /${file(./serverless_ssm.yml):API_VERSION}/estadisticas-climaticas/insert
private: true
resources:
- ${file(src/resources/dynamo-table.yml)}
- ${file(src/resources/api-gateway.yml)}
custom:
serverless-offline-ssm:
stages:
- dev
ssm:
${file(./serverless_ssm.yml)}
dynamodb:
stages:
- dev
start:
inMemory: true
migrate: true
seed: true
serverless-offline:
httpPort: 4000
lambdaPort: 4002