-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
56 lines (48 loc) · 1.66 KB
/
serverless.yml
File metadata and controls
56 lines (48 loc) · 1.66 KB
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
service: example-aws-golang-with-al2-dd-bridge
frameworkVersion: "3"
provider:
name: aws
runtime: provided.al2
# architecture: arm64 # use if you want to run Lambda Graviton ARM-based
architecture: x86_64
functions:
bootstrap:
handler: hello-src/main.go
layers:
- arn:aws:lambda:us-east-1:666523192759:layer:codesee-dd-bridge:6 # This version currently only support x86, no ARM support yet.
environment:
# required env variables
DD_APM_DD_URL: http://127.0.0.1:8080
DD_APM_NON_LOCAL_TRAFFIC: true
DD_APM_ENABLED: true
CODESEE_BRIDGE_FORWARD_HOST: https://in-datadog.codesee.io
CODESEE_BRIDGE_TOKEN: <YOUR_CODESEE_TOKEN>
# optional
CODESEE_ENABLE_ACCESS_LOGS: false # DEBUG - turn on for debug logging CodeSee Lambda Layer
events:
- httpApi:
path: /hello
method: get
package:
patterns:
- ./bin/**
custom:
datadog:
enabled: true
addExtension: true
addLayers: true
site: datadoghq.com # point toward your DD site: https://docs.datadoghq.com/getting_started/site/
apiKey: xxx # for quick testing, put your DD API key here
# apiKeySecretArn: <DATADOG_API_KEY_SECRET_ARN> # in Prod, point toward your AWS Secret Manager
enableDDLogs: true
enableDDTracing: true
captureLambdaPayload: true
env: development
# https://github.com/serverless/serverless/discussions/11667#discussioncomment-4976759
go:
supportedRuntimes: ["provided.al2"]
buildProvidedRuntimeAsBootstrap: true
cmd: GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" # Set GOARCH=arm64 if wanted to target ARM
plugins:
- serverless-plugin-datadog
- serverless-go-plugin