AWS Elastic Beanstalk installation for Java

To install New Relic you will need:

Downloading New Relic

To download the latest New Relic agent:

  1. Log in to New Relic.
  2. From the New Relic menu bar, select (account dropdown) > Account settings.
  3. Select the option to download the agent for your platform.

As part of the installation process, use the newrelic.jar and newrelic.yml files.

Account settings agent information
(account dropdown) > Account settings: You can find the most recent version of the New Relic agent under your Account settings.


Your newrelic.yml (config) file should work without modification. If you decide to customize your config file, see Java agent configuration.

  1. In your WAR file, add the newrelic.jar and newrelic.yml files to WEB-INF/lib/.
  2. Repackage and deploy your new WAR file as a new application or an update to a previous application.

Agent activation

These directions are for the Tomcat 6/7 container. You may need to alter the file path for your container.

  1. From the Default Environment page, select Environment Details > Overview.
  2. Select Edit Configuration.
  3. From the Container tab, enter the following into the JVM Command Line Options field:

    -javaagent:<Tomcat home>/webapps/ROOT/WEB-INF/lib/newrelic.jar
  4. Select Apply Changes.

The JVM will restart and the application should start appearing in the New Relic UI within minutes.

Some versions appear to have a parsing issue that requires the backslashes to be escaped:

Screen aws default environment.jpg
Default Environment > Environment Details > Overview > Configuration: Add the New Relic path to the Container field.

For more help

Additional documentation resources include:

Join the discussion about Java monitoring in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at