-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathserverless.yml
57 lines (51 loc) · 1.55 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
# IAM permissions require service name to begin with 'integration-tests'
service: integration-tests-python
provider:
name: aws
region: eu-west-1
tracing:
lambda: "PassThrough"
architecture: ${env:SLS_ARCH}
environment:
DD_INTEGRATION_TEST: true
DD_TRACE_ENABLED: true
DD_API_KEY: ${env:DD_API_KEY}
DD_TRACE_MANAGED_SERVICES: true
DD_COLD_START_TRACING: false
DD_SERVICE: ${self:service}
timeout: 15
deploymentBucket:
name: integration-tests-serververless-deployment-bucket
iam:
# IAM permissions require that all functions are deployed with this role
role: "arn:aws:iam::425362996713:role/serverless-integration-test-lambda-role"
layers:
- { Ref: PythonLambdaLayer }
- { Ref: PythonRequirementsLambdaLayer }
plugins:
- serverless-python-requirements
custom:
pythonRequirements:
pythonBin: python3
pipCmdExtraArgs:
- --no-deps # install just requests
layer:
compatibleRuntimes:
- ${env:SERVERLESS_RUNTIME}
layers:
python:
package:
artifact: ../../.layers/datadog_lambda_py-${env:ARCH}-${env:PYTHON_VERSION}.zip
functions:
# async-metrics (flushed to logs)
async-metrics_python:
name: integration-tests-python-${sls:stage}-async-metrics_${env:RUNTIME}
handler: handle.handle
runtime: ${env:SERVERLESS_RUNTIME}
environment:
DD_FLUSH_TO_LOG: true
# sync-metrics (sent via API)
sync-metrics_python:
name: integration-tests-python-${sls:stage}-sync-metrics_${env:RUNTIME}
handler: handle.handle
runtime: ${env:SERVERLESS_RUNTIME}