Skip to content

Commit

Permalink
fix(serverless): caught a few typos
Browse files Browse the repository at this point in the history
  • Loading branch information
homelessbirds committed Apr 22, 2024
1 parent 2f96ede commit 673d865
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,21 +293,21 @@ Manual instrumentation:
1. In the default **Code** tab, scroll down to the **Layers** section and click on the **Add a layer** button.
1. Click the **Create layer** button.
1. Now go to the **Choose a layer** and select the **Specify an ARN** option.
1. Go to [New Relic's list of layers](https://layers.newrelic-external.com/) and use the drop-down list to select the AWS region where your Lambda function is hosted. From there, locate the ARN that matches your Lambda function's Ruby version and architecture. There should be options, either X86 or ARM64. Use the **Copy to clipboard** button or manually copy the ARN string.
1. Go to [New Relic's list of layers](https://layers.newrelic-external.com/) and use the drop-down list to select the AWS region where your Lambda function is hosted. From there, locate the ARN that matches your Lambda function's Ruby version and architecture. There should be two options: X86 and ARM64. Use the **Copy to clipboard** button or manually copy the ARN string.
1. In the **Specify an ARN** section of the AWS console form, paste in the New Relic Lambda layer ARN.
1. On the AWS console form, click the **Add** button to add the layer to your Lambda function.
1. On your Lambda function's page, with the default **Code** tab selected, scroll down to the **Runtime settings** section and click the **Edit** button.
1. Make a safe copy of the existing **Handler** value. You'll need it for a later step.
1. Change the **Handler** value to: `newrelic_lambda_wrapper.handler` and click **Save**.
1. Switch to the "Configuration" tab on your Lambda function's page.
1. Switch to the **Configuration** tab on your Lambda function's page.
1. Select the **Environment variables** sub-tab.
1. Define the following environment variables:
* `NEW_RELIC_ACCOUNT_ID` Set to your New Relic [account ID](/docs/accounts/install-new-relic/account-setup/account-id)
* `NEW_RELIC_LAMBDA_HANDLER` Set to your function's original Handler value copied down in step 8 earlier
* `NEW_RELIC_LICENSE_KEY` Set to your New Relic license key
* `NEW_RELIC_LOG_ENDPOINT` Set to 'https://log-api.newrelic.com/log/v1'
* `NEW_RELIC_TELEMETRY_ENDPOINT` Set to 'https://cloud-collector.newrelic.com/aws/lambda/v1'
1. If you wish to send your Lambda function's logs to New Relic, which will include everything your function writes to STDOUT, make sure you set the `NEW_RELIC_EXTENSION_SEND_FUNCTION_LOGS` environment variable to 'true'.
1. If you want to send your Lambda function's logs to New Relic, which will include everything your function writes to STDOUT, make sure you set the `NEW_RELIC_EXTENSION_SEND_FUNCTION_LOGS` environment variable to 'true'.

<Callout variant="tip">
The New Relic layer will automatically deliver the New Relic Ruby agent and be loaded via a Ruby `require` prior to your Lambda function's invocation. To avoid conflicts, do not include a copy of the Ruby agent anywhere else. Feel free to perform any desired New Relic Ruby agent API calls within your function to take advantage of the agent's presence.
Expand Down

0 comments on commit 673d865

Please sign in to comment.