-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
47 lines (41 loc) · 1014 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
42
43
44
45
46
47
frameworkVersion: "3"
service: cloudfrontLogs
useDotenv: true
provider:
name: aws
runtime: python3.11
memorySize: 512
timeout: 900
environment:
PYTHONPATH: ./src
MY_AWS_ACCESS_KEY: ${env:MY_AWS_ACCESS_KEY}
MY_AWS_SECRET_KEY: ${env:MY_AWS_SECRET_KEY}
OPENSEARCH_HOST: ${env:OPENSEARCH_HOST}
OPENSEARCH_USERNAME: ${env:OPENSEARCH_USERNAME}
OPENSEARCH_PASSWORD: ${env:OPENSEARCH_PASSWORD}
region: ap-south-1
package:
patterns:
# exclude everything
- "!./**"
# include only what's needed
- src/cloudfront_parser.py
- src/lambda_handler.py
- src/version.py
functions:
cloudfrontLogs:
handler: src/lambda_handler.handler
events:
- s3:
bucket: parveztest
event: s3:ObjectCreated:*
rules:
- prefix: logs/
- suffix: .gz
existing: true
forceDeploy: true
plugins:
- serverless-python-requirements
custom:
pythonRequirements:
fileName: requirements-lambda.txt