Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions docs/add-extension/add-extension-layer-widget.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
++++
<div class="tabs" data-tab-group="os">
<div role="tablist" aria-label="dependency">
<button role="tab"
aria-selected="true"
aria-controls="console-tab-layer"
id="console-layer">
AWS Web Console
</button>
<button role="tab"
aria-selected="false"
aria-controls="cli-tab-layer"
id="cli-layer"
tabindex="-1">
AWS CLI
</button>
<button role="tab"
aria-selected="false"
aria-controls="sam-tab-layer"
id="sam-layer"
tabindex="-1">
SAM
</button>
<button role="tab"
aria-selected="false"
aria-controls="serverless-tab-layer"
id="serverless-layer"
tabindex="-1">
Serverless
</button>
<button role="tab"
aria-selected="false"
aria-controls="terraform-tab-layer"
id="terraform-layer"
tabindex="-1">
Terraform
</button>
</div>
<div tabindex="0"
role="tabpanel"
id="console-tab-layer"
name="lambda-tabpanel"
aria-labelledby="console-layer">
++++

include::add-extension-layer.asciidoc[tag=console-{layer-section-type}]

++++
</div>
<div tabindex="0"
role="tabpanel"
id="cli-tab-layer"
name="lambda-tabpanel"
aria-labelledby="cli-layer"
hidden="">
++++

include::add-extension-layer.asciidoc[tag=cli-{layer-section-type}]

++++
</div>
<div tabindex="0"
role="tabpanel"
id="sam-tab-layer"
name="lambda-tabpanel"
aria-labelledby="sam-layer"
hidden="">
++++

include::add-extension-layer.asciidoc[tag=sam-{layer-section-type}]

++++
</div>
<div tabindex="0"
role="tabpanel"
id="serverless-tab-layer"
name="lambda-tabpanel"
aria-labelledby="serverless-layer"
hidden="">
++++

include::add-extension-layer.asciidoc[tag=serverless-{layer-section-type}]

++++
</div>
<div tabindex="0"
role="tabpanel"
id="terraform-tab-layer"
name="lambda-tabpanel"
aria-labelledby="terraform-layer"
hidden="">
++++

include::add-extension-layer.asciidoc[tag=terraform-{layer-section-type}]

++++
</div>
</div>
++++
159 changes: 159 additions & 0 deletions docs/add-extension/add-extension-layer.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
// tag::console-extension-only[]

To add a layer to a Lambda function through the AWS Management Console:

1. Navigate to your function in the AWS Management Console
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]
3. Choose the _Specify an ARN_ radio button
4. Copy and paste the following ARN of the APM Lambda Extension layer in the _Specify an ARN_ text input: +
+++<span style="font-size:10pt"><b>EXTENSION_ARN</b></span>+++
image:images/choose-a-layer.png[image of choosing a layer in AWS Console]
5. Click the _Add_ button

// end::console-extension-only[]

// tag::console-with-agent[]

To add the layers to your Lambda function through the AWS Management Console:

1. Navigate to your function in the AWS Management Console
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]
3. Choose the _Specify an ARN_ radio button
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: +
APM Extension layer: +
+++<span style="font-size:10pt"><b>EXTENSION_ARN</b></span>+++ +
APM Agent layer: +
+++<span style="font-size:10pt"><b>AGENT_ARN</b></span>+++
image:images/choose-a-layer.png[image of choosing a layer in AWS Console]
5. Click the _Add_ button

// end::console-with-agent[]

// tag::cli-extension-only[]

To add the APM Extension Layer ARN through the AWS command line interface execute the following command:

[source,bash]
----
aws lambda update-function-configuration --function-name yourLambdaFunctionName \
--layers EXTENSION_ARN
----

// end::cli-extension-only[]

// tag::cli-with-agent[]

To add the Layer ARNs of the APM Extension and the APM Agent through the AWS command line interface execute the following command:

[source,bash]
----
aws lambda update-function-configuration --function-name yourLambdaFunctionName \
--layers EXTENSION_ARN \
AGENT_ARN
----

// end::cli-with-agent[]

// tag::sam-extension-only[]

In your SAM `template.yml` file add the APM Extension Layer ARN as follows:

[source,yml]
----
...
ServerlessFunction:
Type: AWS::Serverless::Function
Properties:
...
Layers:
- EXTENSION_ARN
...
----

// end::sam-extension-only[]

// tag::sam-with-agent[]

In your SAM `template.yml` file add the Layer ARNs of the APM Extension and the APM Agent as follows:

[source,yml]
----
...
ServerlessFunction:
Type: AWS::Serverless::Function
Properties:
...
Layers:
- EXTENSION_ARN
- AGENT_ARN
...
----

// end::sam-with-agent[]

// tag::serverless-extension-only[]

In your `serverless.yml` file add the APM Extension Layer ARN to your function as follows:

[source,yml]
----
...
functions:
yourLambdaFunction:
handler: ...
layers:
- EXTENSION_ARN
...
----

// end::serverless-extension-only[]

// tag::serverless-with-agent[]

In your `serverless.yml` file add the Layer ARNs of the APM Extension and the APM Agent to your function as follows:

[source,yml]
----
...
functions:
yourLambdaFunction:
handler: ...
layers:
- EXTENSION_ARN
- AGENT_ARN
...
----

// end::serverless-with-agent[]

// tag::terraform-extension-only[]
To add the APM Extension Layer to your function add the ARN to the `layers` property in your Terraform file:

[source,terraform]
----
...
resource "aws_lambda_function" "your_lambda_function" {
function_name = "yourLambdaFunctionName"
...
layers = ["EXTENSION_ARN"]
}
...
----

// end::terraform-extension-only[]

// tag::terraform-with-agent[]
To add the APM Extension and the APM Agent to your function add the ARNs to the `layers` property in your Terraform file:

[source,terraform]
----
...
resource "aws_lambda_function" "your_lambda_function" {
function_name = "yourLambdaFunctionName"
...
layers = ["EXTENSION_ARN", "AGENT_ARN"]
}
...
----

// end::terraform-with-agent[]
Loading