Skip to content

Commit c6b3fb5

Browse files
AlexanderWertestolfobmorelli25jlvoiseux
authored
Restructured docs for AWS Lambda (#158)
* Restructured docs for AWS Lambda * Update docs/monitoring-aws-lambda.asciidoc Co-authored-by: Emily S <[email protected]> * Update docs/monitoring-aws-lambda.asciidoc Co-authored-by: Emily S <[email protected]> * Update docs/monitoring-aws-lambda.asciidoc Co-authored-by: Emily S <[email protected]> * Update docs/monitoring-aws-lambda.asciidoc Co-authored-by: Emily S <[email protected]> * add temp anchor to fix build * Update docs/monitoring-aws-lambda.asciidoc Co-authored-by: Brandon Morelli <[email protected]> * Update docs/monitoring-aws-lambda.asciidoc Co-authored-by: Brandon Morelli <[email protected]> * Update docs/monitoring-aws-lambda.asciidoc Co-authored-by: Brandon Morelli <[email protected]> * Update add-extension-layer.asciidoc * Fixed review comments * Adding missing config options * docs: add env imgs * add images * Added Node.js env-var image Co-authored-by: Emily S <[email protected]> Co-authored-by: bmorelli25 <[email protected]> Co-authored-by: Brandon Morelli <[email protected]> Co-authored-by: Jean-Louis Voiseux <[email protected]>
1 parent 3ad7982 commit c6b3fb5

15 files changed

+473
-272
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
++++
2+
<div class="tabs" data-tab-group="os">
3+
<div role="tablist" aria-label="dependency">
4+
<button role="tab"
5+
aria-selected="true"
6+
aria-controls="console-tab-layer"
7+
id="console-layer">
8+
AWS Web Console
9+
</button>
10+
<button role="tab"
11+
aria-selected="false"
12+
aria-controls="cli-tab-layer"
13+
id="cli-layer"
14+
tabindex="-1">
15+
AWS CLI
16+
</button>
17+
<button role="tab"
18+
aria-selected="false"
19+
aria-controls="sam-tab-layer"
20+
id="sam-layer"
21+
tabindex="-1">
22+
SAM
23+
</button>
24+
<button role="tab"
25+
aria-selected="false"
26+
aria-controls="serverless-tab-layer"
27+
id="serverless-layer"
28+
tabindex="-1">
29+
Serverless
30+
</button>
31+
<button role="tab"
32+
aria-selected="false"
33+
aria-controls="terraform-tab-layer"
34+
id="terraform-layer"
35+
tabindex="-1">
36+
Terraform
37+
</button>
38+
</div>
39+
<div tabindex="0"
40+
role="tabpanel"
41+
id="console-tab-layer"
42+
name="lambda-tabpanel"
43+
aria-labelledby="console-layer">
44+
++++
45+
46+
include::add-extension-layer.asciidoc[tag=console-{layer-section-type}]
47+
48+
++++
49+
</div>
50+
<div tabindex="0"
51+
role="tabpanel"
52+
id="cli-tab-layer"
53+
name="lambda-tabpanel"
54+
aria-labelledby="cli-layer"
55+
hidden="">
56+
++++
57+
58+
include::add-extension-layer.asciidoc[tag=cli-{layer-section-type}]
59+
60+
++++
61+
</div>
62+
<div tabindex="0"
63+
role="tabpanel"
64+
id="sam-tab-layer"
65+
name="lambda-tabpanel"
66+
aria-labelledby="sam-layer"
67+
hidden="">
68+
++++
69+
70+
include::add-extension-layer.asciidoc[tag=sam-{layer-section-type}]
71+
72+
++++
73+
</div>
74+
<div tabindex="0"
75+
role="tabpanel"
76+
id="serverless-tab-layer"
77+
name="lambda-tabpanel"
78+
aria-labelledby="serverless-layer"
79+
hidden="">
80+
++++
81+
82+
include::add-extension-layer.asciidoc[tag=serverless-{layer-section-type}]
83+
84+
++++
85+
</div>
86+
<div tabindex="0"
87+
role="tabpanel"
88+
id="terraform-tab-layer"
89+
name="lambda-tabpanel"
90+
aria-labelledby="terraform-layer"
91+
hidden="">
92+
++++
93+
94+
include::add-extension-layer.asciidoc[tag=terraform-{layer-section-type}]
95+
96+
++++
97+
</div>
98+
</div>
99+
++++
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
// tag::console-extension-only[]
2+
3+
To add a layer to a Lambda function through the AWS Management Console:
4+
5+
1. Navigate to your function in the AWS Management Console
6+
2. Scroll to the Layers section and click the _Add a layer_ button image:images/config-layer.png[image of layer configuration section in AWS Console]
7+
3. Choose the _Specify an ARN_ radio button
8+
4. Copy and paste the following ARN of the APM Lambda Extension layer in the _Specify an ARN_ text input: +
9+
+++<span style="font-size:10pt"><b>EXTENSION_ARN</b></span>+++
10+
image:images/choose-a-layer.png[image of choosing a layer in AWS Console]
11+
5. Click the _Add_ button
12+
13+
// end::console-extension-only[]
14+
15+
// tag::console-with-agent[]
16+
17+
To add the layers to your Lambda function through the AWS Management Console:
18+
19+
1. Navigate to your function in the AWS Management Console
20+
2. Scroll to the Layers section and click the _Add a layer_ button image:images/config-layer.png[image of layer configuration section in AWS Console]
21+
3. Choose the _Specify an ARN_ radio button
22+
4. Copy and paste the following ARNs of the APM Lambda Extension layer and the APM agent layer in the _Specify an ARN_ text input: +
23+
APM Extension layer: +
24+
+++<span style="font-size:10pt"><b>EXTENSION_ARN</b></span>+++ +
25+
APM Agent layer: +
26+
+++<span style="font-size:10pt"><b>AGENT_ARN</b></span>+++
27+
image:images/choose-a-layer.png[image of choosing a layer in AWS Console]
28+
5. Click the _Add_ button
29+
30+
// end::console-with-agent[]
31+
32+
// tag::cli-extension-only[]
33+
34+
To add the APM Extension Layer ARN through the AWS command line interface execute the following command:
35+
36+
[source,bash]
37+
----
38+
aws lambda update-function-configuration --function-name yourLambdaFunctionName \
39+
--layers EXTENSION_ARN
40+
----
41+
42+
// end::cli-extension-only[]
43+
44+
// tag::cli-with-agent[]
45+
46+
To add the Layer ARNs of the APM Extension and the APM Agent through the AWS command line interface execute the following command:
47+
48+
[source,bash]
49+
----
50+
aws lambda update-function-configuration --function-name yourLambdaFunctionName \
51+
--layers EXTENSION_ARN \
52+
AGENT_ARN
53+
----
54+
55+
// end::cli-with-agent[]
56+
57+
// tag::sam-extension-only[]
58+
59+
In your SAM `template.yml` file add the APM Extension Layer ARN as follows:
60+
61+
[source,yml]
62+
----
63+
...
64+
Resources:
65+
yourLambdaFunction:
66+
Type: AWS::Serverless::Function
67+
Properties:
68+
...
69+
Layers:
70+
- EXTENSION_ARN
71+
...
72+
----
73+
74+
// end::sam-extension-only[]
75+
76+
// tag::sam-with-agent[]
77+
78+
In your SAM `template.yml` file add the Layer ARNs of the APM Extension and the APM Agent as follows:
79+
80+
[source,yml]
81+
----
82+
...
83+
Resources:
84+
yourLambdaFunction:
85+
Type: AWS::Serverless::Function
86+
Properties:
87+
...
88+
Layers:
89+
- EXTENSION_ARN
90+
- AGENT_ARN
91+
...
92+
----
93+
94+
// end::sam-with-agent[]
95+
96+
// tag::serverless-extension-only[]
97+
98+
In your `serverless.yml` file add the APM Extension Layer ARN to your function as follows:
99+
100+
[source,yml]
101+
----
102+
...
103+
functions:
104+
yourLambdaFunction:
105+
handler: ...
106+
layers:
107+
- EXTENSION_ARN
108+
...
109+
----
110+
111+
// end::serverless-extension-only[]
112+
113+
// tag::serverless-with-agent[]
114+
115+
In your `serverless.yml` file add the Layer ARNs of the APM Extension and the APM Agent to your function as follows:
116+
117+
[source,yml]
118+
----
119+
...
120+
functions:
121+
yourLambdaFunction:
122+
handler: ...
123+
layers:
124+
- EXTENSION_ARN
125+
- AGENT_ARN
126+
...
127+
----
128+
129+
// end::serverless-with-agent[]
130+
131+
// tag::terraform-extension-only[]
132+
To add the APM Extension Layer to your function add the ARN to the `layers` property in your Terraform file:
133+
134+
[source,terraform]
135+
----
136+
...
137+
resource "aws_lambda_function" "your_lambda_function" {
138+
...
139+
layers = ["EXTENSION_ARN"]
140+
}
141+
...
142+
----
143+
144+
// end::terraform-extension-only[]
145+
146+
// tag::terraform-with-agent[]
147+
To add the APM Extension and the APM Agent to your function add the ARNs to the `layers` property in your Terraform file:
148+
149+
[source,terraform]
150+
----
151+
...
152+
resource "aws_lambda_function" "your_lambda_function" {
153+
...
154+
layers = ["EXTENSION_ARN", "AGENT_ARN"]
155+
}
156+
...
157+
----
158+
159+
// end::terraform-with-agent[]

0 commit comments

Comments
 (0)