-
Notifications
You must be signed in to change notification settings - Fork 232
Improved lambda getting started docs #1511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
948f49c
Improve lambda getting started docs
AlexanderWert 1cdaa93
fixed labels in configure-lambda-widget.asciidoc
AlexanderWert 2629fdc
match java prereq language
bmorelli25 2e4f0c6
remove img and include from another repo
bmorelli25 9831fd6
fixed heading level of step 3
AlexanderWert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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-lambda-python-config" | ||
| id="console-lambda-python-config"> | ||
| AWS Web Console | ||
| </button> | ||
| <button role="tab" | ||
| aria-selected="false" | ||
| aria-controls="cli-tab-lambda-python-config" | ||
| id="cli-lambda-python-config" | ||
| tabindex="-1"> | ||
| AWS CLI | ||
| </button> | ||
| <button role="tab" | ||
| aria-selected="false" | ||
| aria-controls="sam-tab-lambda-python-config" | ||
| id="sam-lambda-python-config" | ||
| tabindex="-1"> | ||
| SAM | ||
| </button> | ||
| <button role="tab" | ||
| aria-selected="false" | ||
| aria-controls="serverless-tab-lambda-python-config" | ||
| id="serverless-lambda-python-config" | ||
| tabindex="-1"> | ||
| Serverless | ||
| </button> | ||
| <button role="tab" | ||
| aria-selected="false" | ||
| aria-controls="terraform-tab-lambda-python-config" | ||
| id="terraform-lambda-python-config" | ||
| tabindex="-1"> | ||
| Terraform | ||
| </button> | ||
| </div> | ||
| <div tabindex="0" | ||
| role="tabpanel" | ||
| id="console-tab-lambda-python-config" | ||
| name="lambda-tabpanel" | ||
| aria-labelledby="console-lambda-python-config"> | ||
| ++++ | ||
|
|
||
| include::configure-lambda.asciidoc[tag=console-{layer-section-type}] | ||
|
|
||
| ++++ | ||
| </div> | ||
| <div tabindex="0" | ||
| role="tabpanel" | ||
| id="cli-tab-lambda-python-config" | ||
| name="lambda-tabpanel" | ||
| aria-labelledby="cli-lambda-python-config" | ||
| hidden=""> | ||
| ++++ | ||
|
|
||
| include::configure-lambda.asciidoc[tag=cli-{layer-section-type}] | ||
|
|
||
| ++++ | ||
| </div> | ||
| <div tabindex="0" | ||
| role="tabpanel" | ||
| id="sam-tab-lambda-python-config" | ||
| name="lambda-tabpanel" | ||
| aria-labelledby="sam-lambda-python-config" | ||
| hidden=""> | ||
| ++++ | ||
|
|
||
| include::configure-lambda.asciidoc[tag=sam-{layer-section-type}] | ||
|
|
||
| ++++ | ||
| </div> | ||
| <div tabindex="0" | ||
| role="tabpanel" | ||
| id="serverless-tab-lambda-python-config" | ||
| name="lambda-tabpanel" | ||
| aria-labelledby="serverless-lambda-python-config" | ||
| hidden=""> | ||
| ++++ | ||
|
|
||
| include::configure-lambda.asciidoc[tag=serverless-{layer-section-type}] | ||
|
|
||
| ++++ | ||
| </div> | ||
| <div tabindex="0" | ||
| role="tabpanel" | ||
| id="terraform-tab-lambda-python-config" | ||
| name="lambda-tabpanel" | ||
| aria-labelledby="terraform-lambda-python-config" | ||
| hidden=""> | ||
| ++++ | ||
|
|
||
| include::configure-lambda.asciidoc[tag=terraform-{layer-section-type}] | ||
|
|
||
| ++++ | ||
| </div> | ||
| </div> | ||
| ++++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| // tag::console-extension-only[] | ||
|
|
||
| To configure APM through the AWS Management Console: | ||
|
|
||
| 1. Navigate to your function in the AWS Management Console | ||
| 2. Click on the _Configuration_ tab | ||
| 3. Click on _Environment variables_ | ||
| 4. Add the following required variables: | ||
|
|
||
| [source,bash] | ||
| ---- | ||
| ELASTIC_APM_LAMBDA_APM_SERVER = <YOUR-APM-SERVER-URL> # this is your APM Server URL | ||
| ELASTIC_APM_SECRET_TOKEN = <YOUR-APM-SECRET-TOKEN> # this is your APM secret token | ||
| ---- | ||
|
|
||
| -- | ||
| include::{apm-aws-lambda-root}/docs/images/images.asciidoc[tag=python-env-vars] | ||
| -- | ||
|
|
||
| // end::console-extension-only[] | ||
|
|
||
| // tag::cli-extension-only[] | ||
|
|
||
| To configure APM through the AWS command line interface execute the following command: | ||
|
|
||
| [source,bash] | ||
| ---- | ||
| aws lambda update-function-configuration --function-name yourLambdaFunctionName \ | ||
| --environment "Variables={ELASTIC_APM_LAMBDA_APM_SERVER=<YOUR-APM-SERVER-URL>,ELASTIC_APM_SECRET_TOKEN=<YOUR-APM-SECRET-TOKEN>}" | ||
| ---- | ||
|
|
||
| // end::cli-extension-only[] | ||
|
|
||
| // tag::sam-extension-only[] | ||
|
|
||
| In your SAM `template.yml` file add the Layer ARNs of the APM Extension and the APM Agent as follows: | ||
|
|
||
| [source,yml] | ||
| ---- | ||
| ... | ||
| Resources: | ||
| yourLambdaFunction: | ||
| Type: AWS::Serverless::Function | ||
| Properties: | ||
| ... | ||
| Environment: | ||
| Variables: | ||
| ELASTIC_APM_LAMBDA_APM_SERVER: <YOUR-APM-SERVER-URL> | ||
| ELASTIC_APM_SECRET_TOKEN: <YOUR-APM-SECRET-TOKEN> | ||
| ... | ||
| ---- | ||
|
|
||
| // end::sam-extension-only[] | ||
|
|
||
| // tag::serverless-extension-only[] | ||
|
|
||
| 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: | ||
| ... | ||
| environment: | ||
| ELASTIC_APM_LAMBDA_APM_SERVER: <YOUR-APM-SERVER-URL> | ||
| ELASTIC_APM_SECRET_TOKEN: <YOUR-APM-SECRET-TOKEN> | ||
| ... | ||
| ---- | ||
|
|
||
| // end::serverless-extension-only[] | ||
|
|
||
| // tag::terraform-extension-only[] | ||
| 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" { | ||
| ... | ||
| environment { | ||
| variables = { | ||
| ELASTIC_APM_LAMBDA_APM_SERVER = "<YOUR-APM-SERVER-URL>" | ||
| ELASTIC_APM_SECRET_TOKEN = "<YOUR-APM-SECRET-TOKEN>" | ||
| } | ||
| } | ||
| } | ||
| ... | ||
| ---- | ||
|
|
||
| // end::terraform-extension-only[] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.