Troubleshoot Lambda function not showing as instrumented

Problem

You've instrumented your Lambda function but it is not showing as instrumented in the Amazon Web Services -> Lambda functions section of New Relic.

Solution

You've linked both an API polling and Metric Streams integration to your New Relic account manually in the UI.

In this scenario with two integrations for the same AWS account in one New Relic account, a race condition will occur when instrumented payloads are received from the instrumented Lambda function at the New Relic cloud-collector endpoint. The payload will be randomly assigned to one of the two integrations. If assigned to the integration not linked to your function entity, the payload will be dropped and the function will not show as instrumented. Only functions that have received at least one payload in the last 30 days to the AwsLambdaInvocation event will show as instrumented.

FROM AwsLambdaInvocation
SELECT count (*)
SINCE 30 days ago
WHERE entityGuid = 'ENTITY_GUID'
LIMIT 1

To prevent creating two integrations for the same AWS account, we recommend you use the newrelic-lambda CLI, as mentioned above, because it will detect an existing integration and use it.

If two integrations have already been created, choose one to keep and unlink the other by clicking Unlink this account at Infrastructure > AWS in New Relic.

Tip

There are some limitations to Metric Streams integrations that should be considered before unlinking an API polling integration. There are also some limitations to Infrastructure Dimensional metrics queries which should be considered before fully committing to a Metric Streams integration.