-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
43 lines (40 loc) · 1.07 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
service:
name: schedule-python-oai-example
provider:
name: aws
runtime: python3.6
memorySize: 128
timeout: 10
stage: production
region: us-east-1
environment:
ESURL:
Fn::GetAtt: [ ElasticSearchInstance , DomainEndpoint ]
iamRoleStatements:
- Effect: Allow
Action:
- es:ESHttp*
Resource: { "Fn::GetAtt": ["ElasticSearchInstance", "DomainArn" ] }
functions:
indexCollectionEarthquake:
handler: handler.run
events:
- schedule:
rate: cron(0 14 * * ? *)
enabled: true
resources:
Resources:
ElasticSearchInstance:
Type: AWS::Elasticsearch::Domain
Properties:
DomainName: test-item-es-instance
EBSOptions:
EBSEnabled: true
VolumeType: gp2
VolumeSize: 10
ElasticsearchClusterConfig:
InstanceType: t2.small.elasticsearch
InstanceCount: 1
DedicatedMasterEnabled: false
ZoneAwarenessEnabled: false
ElasticsearchVersion: 6.4