generated from dvsa/cvs-svc-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
41 lines (37 loc) · 977 Bytes
/
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
service: cvs-tsk-atf-daily-schedules
useDotenv: true
plugins:
- serverless-offline
- serverless-plugin-typescript
# - serverless-offline-aws-eventbridge
provider:
profile: ${env:AWS_PROVIDER_PROFILE, 'default'}
name: aws
runtime: nodejs18.x
stage: ${env:NODE_ENV, 'local'}
region: ${env:AWS_REGION, 'local'}
# To load environment variables externally
# copy ./.env.example to ./.env.local.
environment:
SERVICE_VERSION: ${env:API_VERSION}
AWS_REGION: ${self:provider.region}
AWS_STAGE: ${self:provider.stage}
SERVICE: ${self:service}
functions:
processWmsData:
handler: src/handler.handler
events:
- cloudwatchEvent:
event:
source:
- 'aws.events'
detail-type:
- 'Scheduled Event'
detail:
task:
- 'processWmsData'
custom:
dotenv:
basePath: './'
serverless-offline:
httpPort: ${env:AWS_SERVER_PORT, 3001}