GithubHelp home page GithubHelp logo

keegoid-nr / newrelic-lambda-layers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from newrelic/newrelic-lambda-layers

0.0 2.0 1.0 241 KB

Source code and utilities to build and publish New Relic's public AWS Lambda layers.

Home Page: https://newrelic.com/products/serverless-aws-lambda

License: Apache License 2.0

Shell 71.60% Python 12.42% JavaScript 15.98%

newrelic-lambda-layers's Introduction

New Relic Lambda Layers

This repository contains source code and utilities to build and publish New Relic's public AWS Lambda layers.

Most users should use our published layers which are chosen automatically via the CLI tool. Those layers are published to be public and are available here.

This tool is released for users seeking to deploy their own copies of the New Relic Lambda Layers into their accounts, or to modify and publish their own customized wrapper layers.

Requirements:

  • aws-cli
  • bash shell

The AWS cli must be configured, please refer to its documentation.

Publishing Layers:

Run the following in your shell:

cd python
./publish-layers.sh
cd ..
cd nodejs;
./publish-layers.sh
cd ..

Attaching Custom Lambda Layer ARNs

The layers published to your account may be used directly within SAM, Cloudformation Templates, Serverless.yml, or other configuration methods that allow specifying the use of layers by ARN.

New Relic Serverless APM customers are advised to use the newrelic-lambda-cli tool, and this may be used with custom layers as follows by adding the --layer-arn flag to the layers install command:

newrelic-lambda layers install \
    --function <name or arn> \
    --nr-account-id <new relic account id>
    --layer-arn <YOUR_CUSTOM_LAYER_ARN>

Manual Instrumentation using Layers:

We recommend using the newrelic-lambda-cli tool, but some users find that they need, or prefer to manually configure their functions.

These steps will help you configure the layers correctly:

  1. Find the New Relic AWS Lambda Layer ARN that matches your runtime and region.
  2. Copy the ARN of the most recent AWS Lambda Layer version and attach it to your function.
  1. Update your functions handler to point to the newly attached layer in the console for your function:
  • Python: newrelic_lambda_wrapper.handler
  • Node: newrelic-lambda-wrapper.handler
  1. Add these environment variables to your Lambda console:
  • NEW_RELIC_ACCOUNT_ID: Your New Relic account ID
  • NEW_RELIC_LAMBDA_HANDLER: Path to your initial handler.

Refer to the New Relic AWS Lambda Monitoring Documentation for instructions on completing your configuration by linking your AWS Account and Cloudwatch Log Streams to New Relic.

newrelic-lambda-layers's People

Contributors

dependabot[bot] avatar ewindisch avatar kolanos avatar mrickard avatar

Watchers

 avatar  avatar

Forkers

lartita

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.