• English日本語한국어
  • Log inStart now

AWS Elastic Beanstalk installation for Java

If you are an AWS Elastic Beanstalk user, the Java agent requires additional configuration.


Before completing the configuration, you must first:

To complete Java agent installation on AWS Elastic Beanstalk:

  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.
  3. Locate and connect to the underlaying EC2 instance. Once connected, find the path to newrelic.jar file using this command - ensure you search one directory at a time. Use either /var or /usr as appropriate.
sudo find </var | /usr> -name "newrelic.jar"

Pass -javaagent flag to JVM

To pass the -javaagent flag to JVM in AWS Elastic Beanstalk

  1. In the AWS console, open the Elastic Beanstalk.

  2. Select the relevant region.

  3. Select your application.

  4. In the left pane, select Configurations.

  5. Open Software Configuration.

  6. Under Container Options, add the following in the JVM options field:

  7. Select Apply to save.

Your Elastic Beanstalk will then update your environment.

Copyright © 2023 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.