-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
43 lines (38 loc) · 1.19 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: pxsearch
frameworkVersion: '3'
provider:
name: aws
runtime: python3.8
region: eu-central-1
memorySize: 512
timeout: 30
environment:
POSTGRES_HOST: ${file(./secretsHandler.js):getParameters.POSTGRES_HOST}
POSGRES_PORT: "5432"
POSTGRES_DBNAME: ${file(./secretsHandler.js):getParameters.POSTGRES_DBNAME}
POSTGRES_USER: ${file(./secretsHandler.js):getParameters.POSTGRES_USER}
POSTGRES_PASS: ${file(./secretsHandler.js):getParameters.POSTGRES_PASS}
SENTRY_DSN: ${file(./secretsHandler.js):getParameters.SENTRY_DSN}
iam:
role:
statements:
- Effect: Allow
Action:
- 's3:GetObject'
- 's3:ListBucket'
- 's3:GetBucketLocation'
Resource:
- 'arn:aws:s3:::usgs-landsat/*'
- 'arn:aws:s3:::usgs-landsat'
package:
patterns: pxsearch
functions:
pxsearch:
name: pxsearch
handler: "pxsearch.ingest.signals.signal_handler"
events:
- externalSNS: "arn:aws:sns:us-west-2:673253540267:public-c2-notify"
- externalSNS: "arn:aws:sns:us-west-2:608149789419:cirrus-v0-publish"
plugins:
- serverless-python-requirements
- serverless-plugin-external-sns-events