-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathtemplate.yml
More file actions
50 lines (48 loc) · 1.62 KB
/
template.yml
File metadata and controls
50 lines (48 loc) · 1.62 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
sam-node
Parameters:
ApmServerURL:
Type: String
Description: APM server URL
TestUUID:
Type: String
Description: The UUID used to verify the end-to-end test
TimeoutParam:
Type: Integer
Description: The Timeout for this lambda function
Resources:
ElasticAPMExtensionLayer:
Type: AWS::Serverless::LayerVersion
Properties:
ContentUri: ../../bin
LayerName: apm-lambda-extension
CompatibleArchitectures:
- x86_64
SamTestingNode:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Properties:
Timeout: !Ref TimeoutParam
CodeUri: sam-testing-nodejs/
Handler: app.lambdaHandler
Runtime: nodejs14.x
Layers:
- !Ref ElasticAPMExtensionLayer
Architectures:
- x86_64
Events:
SamTest:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
Path: /hello
Method: get
Environment:
Variables:
ELASTIC_APM_LAMBDA_APM_SERVER: !Ref ApmServerURL
ELASTIC_APM_SECRET_TOKEN: none
ELASTIC_APM_CENTRAL_CONFIG: false
ELASTIC_APM_CLOUD_PROVIDER: none
ELASTIC_APM_SERVER_URL: http://localhost:8200
ELASTIC_APM_SEND_STRATEGY: syncflush
APM_AWS_EXTENSION_TEST_UUID: !Ref TestUUID