-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
119 lines (112 loc) · 3.46 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# main application name
service: cirrus
# high level config
provider:
name: aws
stage: ${opt:stage, 'v1'}
region: ${opt:region, 'us-west-2'}
runtime: python3.7
environment:
CIRRUS_STAC_DESCRIPTION: ${self:service}-${self:provider.stage} STAC
CIRRUS_PUBLIC_CATALOG: true
CIRRUS_API_URL: https://cirrus-earth-search.aws.element84.com/v0
CIRRUS_STAC_VERSION: 1.0.0-beta.2
CIRRUS_LOG_LEVEL: DEBUG
CIRRUS_BUCKET: !Ref ServerlessDeploymentBucket
CIRRUS_DATA_BUCKET: !Ref Data
CIRRUS_CATALOG_BUCKET: !Ref Catalogs
CIRRUS_STATE_DB: !Ref StateTable
CIRRUS_STACK: ${self:service}-${self:provider.stage}
BASE_WORKFLOW_ARN: arn:aws:states:#{AWS::Region}:#{AWS::AccountId}:stateMachine:${self:service}-${self:provider.stage}-
CIRRUS_PROCESS_QUEUE: ${self:service}-${self:provider.stage}-process
CIRRUS_QUEUE_TOPIC_ARN: arn:aws:sns:#{AWS::Region}:#{AWS::AccountId}:${self:service}-${self:provider.stage}-queue
CIRRUS_PUBLISH_TOPIC_ARN: arn:aws:sns:#{AWS::Region}:#{AWS::AccountId}:${self:service}-${self:provider.stage}-publish
iamRoleStatements:
${file(core/iam.yml):iamRoleStatements}
custom:
batch:
SecurityGroupIds:
- ${env:SECURITY_GROUP_1}
Subnets:
- ${env:SUBNET_1}
- ${env:SUBNET_2}
- ${env:SUBNET_3}
- ${env:SUBNET_4}
BasicComputeEnvironments:
MaxvCpus: 1000
CustomComputeEnvironments:
MaxvCpus: 20000
ImageId: ami-0762f74aea69d4143
LambdaAsBatchJob:
Memory: 2048
Vcpus: 1
GeoLambdaAsBatchJob:
Memory: 4000
Vcpus: 1
pythonRequirements:
#dockerizePip: true
slim: true
invalidateCaches: true
useStaticCache: false
useDownloadCache: false
slimPatternsAppendDefaults: false
slimPatterns:
- 'botocore/**'
- 'botocore-*/**'
- 'boto3/**'
- 'boto3-*/**'
- 'bin/**'
- 'dateutils*'
- 'docutils/**'
- 'docutils-*/**'
- 'numpy/**'
- 'numpy-*/**'
- 'rasterio/**'
- 'rasterio-*/**'
- 'six.py'
- 'six-*/**'
- 'urllib3/**'
- 'urllib3-*/**'
- 'jmespath/**'
- 'jmespath-*/**'
# lambda functions
functions:
- ${file(core/lambdas.yml)}
- ${file(feeders/lambdas.yml)}
- ${file(tasks/lambdas.yml)}
# workflows
stepFunctions:
stateMachines:
#publish-only: ${file(workflows/publish-only/definition.yml)}
#mirror: ${file(workflows/mirror/definition.yml)}
#mirror-with-preview: ${file(workflows/mirror-with-preview/definition.yml)}
publish-sentinel: ${file(workflows/publish-sentinel/definition.yml)}
publish-landsat: ${file(workflows/publish-landsat/definition.yml)}
cog-archive: ${file(workflows/cog-archive/definition.yml)}
# enable pre-deployment definition validation
validate: true
# all other resources
resources:
- Description: Cirrus STAC Processing Framework
- ${file(core/resources.yml)}
# Batch
- ${file(tasks/batch-jobs.yml)}
- ${file(core/basic-compute-environments.yml)}
- ${file(core/custom-compute-environments.yml)}
# - Resources:
# Sentinel2L2ASubsciption:
# Type: AWS::SNS::Subscription
# Properties:
# Endpoint: !GetAtt ProcessQueue.Arn
# Protocol: sqs
# Region: "#{AWS::Region}"
# TopicArn: !Ref PublishTopic
# FilterPolicy:
# collection:
# - sentinel-s2-l2a
package:
individually: true
plugins:
- serverless-python-requirements
- serverless-step-functions
- serverless-pseudo-parameters