Files
esdp/serverless/serverless.yml
2026-01-08 12:09:38 -08:00

74 lines
1.8 KiB
YAML

service: esdp-api
app: esdp-api-app
frameworkVersion: "4"
stages:
prod:
# Enables observability in the prod stage
observability: true
# Sepcify parameter values to be used in the prod stage
params:
es_endpoint: https://insurtechtoolkit.com
domain: es.imex.online
beta:
# Enables observability in the prod stage
observability: false
# Sepcify parameter values to be used in the prod stage
params:
es_endpoint: https://4284-79073.el-alt.com
domain: beta.es.imex.online
alpha:
# Enables observability in the prod stage
observability: false
# Sepcify parameter values to be used in the prod stage
params:
es_endpoint: https://4284-79287.el-alt.com
domain: alpha.es.imex.online
dev:
# Enables observability in the prod stage
observability: false
# Sepcify parameter values to be used in the prod stage
params:
es_endpoint: https://4284-79287.el-alt.com
domain: alpha.es.imex.online
# params:
# dev:
# domain: dev.es.imex.online
# alpha:
# domain: alpha.es.imex.online
# beta:
# domain: beta.es.imex.online
# prod:
# domain: es.imex.online
provider:
name: aws
runtime: nodejs22.x
region: ca-central-1
domain: ${param:domain}
httpApi: # This creates a cheaper, faster "HTTP API" Gateway
cors: true # Automatically configures CORS
functions:
# Route 1: POST /scrub
scrub:
handler: src/handlers/scrub.handler
environment:
ES_ENDPOINT: ${param:es_endpoint}
events:
- httpApi:
path: /scrub
method: post
# Route 1: POST /scrub
emsupload:
handler: src/handlers/emsupload.handler
environment:
ES_ENDPOINT: ${param:es_endpoint}
events:
- httpApi:
path: /emsupload
method: post