forked from developmentseed/awspds-mosaic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
102 lines (94 loc) · 2.63 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
service: landsat-mosaic-tiler
provider:
name: aws
runtime: python3.7
stage: ${opt:stage, 'production'}
region: us-west-2
deploymentBucket: ${opt:bucket}
httpApi:
cors: true
iamRoleStatements:
- Effect: "Allow"
Action:
- "*"
Resource:
- arn:aws:s3:::${opt:bucket}*
- Effect: "Allow"
Action:
- "s3:*"
Resource:
- "arn:aws:s3:::landsat-pds*"
apiGateway:
binaryMediaTypes:
- '*/*'
minimumCompressionSize: 1
package:
artifact: package.zip
functions:
tiler:
handler: landsat_mosaic_tiler.handlers.tiles.app
memorySize: 1536
timeout: 10
layers:
- arn:aws:lambda:${self:provider.region}:524387336408:layer:gdal24-py37-geolayer:1
environment:
CACHE_CONTROL: ${opt:cache-control, 'max-age=3600'}
CPL_TMPDIR: /tmp
CPL_VSIL_CURL_ALLOWED_EXTENSIONS: .tif,.TIF,.ovr
GDAL_CACHEMAX: 25%
GDAL_DATA: /opt/share/gdal
GDAL_DISABLE_READDIR_ON_OPEN: FALSE
GDAL_HTTP_MERGE_CONSECUTIVE_RANGES: YES
GDAL_HTTP_MULTIPLEX: YES
GDAL_HTTP_VERSION: 2
MAX_THREADS: 1
MOSAIC_DEF_BUCKET: ${opt:bucket}
PROJ_LIB: /opt/share/proj
PYTHONWARNINGS: ignore
VSI_CACHE: TRUE
VSI_CACHE_SIZE: 536870912
events:
- httpApi:
path: /tiles/{proxy+}
method: '*'
mosaics:
handler: landsat_mosaic_tiler.handlers.mosaic.app
memorySize: 1024
timeout: 20
layers:
- arn:aws:lambda:${self:provider.region}:524387336408:layer:gdal24-py37-geolayer:1
environment:
CACHE_CONTROL: ${opt:cache-control, 'max-age=3600'}
GDAL_DATA: /opt/share/gdal
MOSAIC_DEF_BUCKET: ${opt:bucket}
PROJ_LIB: /opt/share/proj
events:
- httpApi:
path: /mosaic/{proxy+}
method: '*'
batch:
handler: landsat_mosaic_tiler.handlers.tiles.app
memorySize: 3008
timeout: 30
layers:
- arn:aws:lambda:${self:provider.region}:524387336408:layer:gdal24-py37-geolayer:1
environment:
CACHE_CONTROL: ${opt:cache-control, 'max-age=3600'}
CPL_TMPDIR: /tmp
CPL_VSIL_CURL_ALLOWED_EXTENSIONS: .tif,.TIF,.ovr
GDAL_CACHEMAX: 25%
GDAL_DATA: /opt/share/gdal
GDAL_DISABLE_READDIR_ON_OPEN: FALSE
GDAL_HTTP_MERGE_CONSECUTIVE_RANGES: YES
GDAL_HTTP_MULTIPLEX: YES
GDAL_HTTP_VERSION: 2
MAX_THREADS: 1
MOSAIC_DEF_BUCKET: ${opt:bucket}
PROJ_LIB: /opt/share/proj
PYTHONWARNINGS: ignore
VSI_CACHE: TRUE
VSI_CACHE_SIZE: 536870912
events:
- httpApi:
path: /batch/{proxy+}
method: '*'